protocolversion check
authoralexhz <balthazar@yandex.ru>
Sun, 31 Mar 2013 22:57:08 +0000 (22:57 +0000)
committeralexhz <balthazar@yandex.ru>
Sun, 31 Mar 2013 22:57:08 +0000 (22:57 +0000)
p2pool/bitcoin/helper.py
p2pool/networks.py

index 16cb6d5..aa1de4e 100644 (file)
@@ -13,8 +13,8 @@ def check(bitcoind, net):
     if not (yield net.PARENT.RPC_CHECK(bitcoind)):
         print >>sys.stderr, "    Check failed! Make sure that you're connected to the right bitcoind with --bitcoind-rpc-port!"
         raise deferral.RetrySilentlyException()
-    if not net.VERSION_CHECK((yield bitcoind.rpc_getinfo())['version']):
-        print >>sys.stderr, '    Bitcoin version too old! Upgrade to 0.6.4 or newer!'
+    if not net.VERSION_CHECK((yield bitcoind.rpc_getinfo())['protocolversion']):
+        print >>sys.stderr, '    Client version too old! Upgrade is required!'
         raise deferral.RetrySilentlyException()
 
 @deferral.retry('Error getting work from bitcoind:', 3)
index a1cd5f1..64ef844 100644 (file)
@@ -24,7 +24,7 @@ nets = dict(
         WORKER_PORT=8336,
         BOOTSTRAP_ADDRS='188.120.239.144 81.200.245.198 81.200.241.51 81.200.241.54 217.77.220.40'.split(' '),
         ANNOUNCE_CHANNEL='#p2pool-alt',
-        VERSION_CHECK=lambda v: True,
+        VERSION_CHECK=lambda v: 60004 >= v,
     ),
     novacoin_testnet=math.Object(
         PARENT=networks.nets['novacoin_testnet'],