Skip to content

Commit

Permalink
Make sure P2Pool is compliant with the CSV softfork
Browse files Browse the repository at this point in the history
  • Loading branch information
veqtrus committed May 27, 2016
1 parent d1d7dab commit ce09594
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions p2pool/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ def load_share(share, net, peer_addr):
DONATION_SCRIPT = '4104ffd03de44a6e11b9917f3a29f9443283d9871c9d743ef30d5eddcd37094b64d1b3d8090496b53256786bf5c82932ec23c3b74d9f05a6f95a8b5529352656664bac'.decode('hex')

class NewShare(object):
VERSION = 15
VOTING_VERSION = 15
VERSION = 16
VOTING_VERSION = 16
SUCCESSOR = None

small_block_header_type = pack.ComposedType([
Expand Down Expand Up @@ -381,8 +381,8 @@ def as_block(self, tracker, known_txs):
return dict(header=self.header, txs=[self.check(tracker)] + other_txs)

class Share(object):
VERSION = 14
VOTING_VERSION = 14
VERSION = 15
VOTING_VERSION = 15
SUCCESSOR = NewShare

small_block_header_type = pack.ComposedType([
Expand Down
2 changes: 1 addition & 1 deletion p2pool/networks/bitcoin.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
ANNOUNCE_CHANNEL = '#p2pool'
VERSION_CHECK = lambda v: None if 100000 <= v else 'Bitcoin version too old. Upgrade to 0.11.2 or newer!' # not a bug. BIP65 support is ensured by SOFTFORKS_REQUIRED
VERSION_WARNING = lambda v: None
SOFTFORKS_REQUIRED = set(['bip65'])
SOFTFORKS_REQUIRED = set(['bip65', 'csv'])
MINIMUM_PROTOCOL_VERSION = 1500
2 changes: 1 addition & 1 deletion p2pool/p2p.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def fragment(f, **kwargs):
fragment(f, **dict((k, v[len(v)//2:]) for k, v in kwargs.iteritems()))

class Protocol(p2protocol.Protocol):
VERSION = 1500
VERSION = 1600

max_remembered_txs_size = 2500000

Expand Down
2 changes: 1 addition & 1 deletion p2pool/work.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def get_work(self, pubkey_hash, desired_share_target, desired_pseudoshare_target
self.last_work_shares.value[bitcoin_data.pubkey_hash_to_address(pubkey_hash, self.node.net.PARENT)]=share_info['bits']

ba = dict(
version=min(self.current_work.value['version'], 4),
version=max(self.current_work.value['version'], 0x20000000),
previous_block=self.current_work.value['previous_block'],
merkle_link=merkle_link,
coinb1=packed_gentx[:-self.COINBASE_NONCE_LENGTH-4],
Expand Down

0 comments on commit ce09594

Please sign in to comment.