Advertisement
JudeAustin

/p2pool/p2pool/bitcoin/networks.py

Oct 30th, 2013
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.27 KB | None | 0 0
  1. import os
  2. import platform
  3.  
  4. from twisted.internet import defer
  5.  
  6. from . import data
  7. from p2pool.util import math, pack
  8.  
  9. nets = dict(
  10.     oscoin=math.Object(
  11.         P2P_PREFIX='e4e8e9e5'.decode('hex'),
  12.         P2P_PORT=8888,
  13.         ADDRESS_VERSION=2,
  14.         RPC_PORT=8887,
  15.         RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  16. #This was changed >>>> I had ocoinaddress            'Ocoinaddress' in (yield bitcoind.rpc_help()) and
  17.             not (yield bitcoind.rpc_getinfo())['testnet']
  18.         )),
  19.         SUBSIDY_FUNC=lambda height: 50*100000000 >> (height + 1)//210000,
  20.         POW_FUNC=data.hash256,
  21.         BLOCK_PERIOD=600, # s
  22.         SYMBOL='OSC',
  23.         CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'oscoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/oscoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.oscoin'), 'oscoin.conf'),
  24.         BLOCK_EXPLORER_URL_PREFIX='',
  25.         ADDRESS_EXPLORER_URL_PREFIX='',
  26.         TX_EXPLORER_URL_PREFIX='',
  27.         SANE_TARGET_RANGE=(2**256//2**32//1000 - 1, 2**256//2**32 - 1),
  28.         DUMB_SCRYPT_DIFF=1,
  29.         DUST_THRESHOLD=0.001e8,
  30.     ),
  31. )
  32. for net_name, net in nets.iteritems():
  33.     net.NAME = net_name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement