Advertisement
JudeAustin

/p2pool/p2pool/networks.py

Oct 30th, 2013
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.20 KB | None | 0 0
  1. from p2pool.bitcoin import networks
  2. from p2pool.util import math
  3.  
  4. # CHAIN_LENGTH = number of shares back client keeps
  5. # REAL_CHAIN_LENGTH = maximum number of shares back client uses to compute payout
  6. # REAL_CHAIN_LENGTH must always be <= CHAIN_LENGTH
  7. # REAL_CHAIN_LENGTH must be changed in sync with all other clients
  8. # changes can be done by changing one, then the other
  9.  
  10. nets = dict(
  11.     oscoin=math.Object(
  12.         PARENT=networks.nets['oscoin'],
  13.         SHARE_PERIOD=30, # seconds
  14.         CHAIN_LENGTH=24*60*60//10, # shares
  15.         REAL_CHAIN_LENGTH=24*60*60//10, # shares
  16.         TARGET_LOOKBEHIND=200, # shares
  17.         SPREAD=3, # blocks
  18.         IDENTIFIER='fc70000000000000'.decode('hex'),
  19.         PREFIX='2472000000000000'.decode('hex'),
  20.         P2P_PORT=,
  21.         MIN_TARGET=0,
  22.         MAX_TARGET=2**256//2**32 - 1,
  23.         PERSIST=False,
  24.         WORKER_PORT=9332,
  25.         BOOTSTRAP_ADDRS=''.split(' '),
  26.         ANNOUNCE_CHANNEL='#p2pool',
  27.         VERSION_CHECK=lambda v: 50700 <= v < 60000 or 60010 <= v < 60100 or 60400 <= v,
  28.         VERSION_WARNING=lambda v: 'Upgrade Bitcoin to >=0.8.5!' if v < 80500 else None,
  29.     ),
  30. )
  31. for net_name, net in nets.iteritems():
  32.     net.NAME = net_name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement