Skip to content

Commit

Permalink
on bitcoin p2pool, require all peers to be running v15
Browse files Browse the repository at this point in the history
  • Loading branch information
forrestv committed Dec 24, 2015
1 parent 0fec32e commit 6f55d05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions p2pool/networks/bitcoin.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@
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'])
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 @@ -144,7 +144,7 @@ def sendAdvertisement(self):
def handle_version(self, version, services, addr_to, addr_from, nonce, sub_version, mode, best_share_hash):
if self.other_version is not None:
raise PeerMisbehavingError('more than one version message')
if version < 1400:
if version < getattr(self.node.net, 'MINIMUM_PROTOCOL_VERSION', 1400):
raise PeerMisbehavingError('peer too old')

self.other_version = version
Expand Down

0 comments on commit 6f55d05

Please sign in to comment.