Skip to content

Commit

Permalink
Fix the second cal to getinfo/getblockchaininfo; Verify version befor…
Browse files Browse the repository at this point in the history
…e doing the call.
  • Loading branch information
rllola committed Feb 21, 2019
1 parent 9364568 commit 5e2feb5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/Zeroname/updater/zeroname_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,10 @@ def initRpc(config):
time.sleep(5)
rpc = AuthServiceProxy(rpc_auth, timeout=rpc_timeout)

last_block = int(rpc.getinfo()["blocks"])
if node_version < 160000 :
last_block = int(rpc.getinfo()["blocks"])
else:
last_block = int(rpc.getblockchaininfo()["blocks"])
should_publish = False
for block_id in range(config["lastprocessed"] + 1, last_block + 1):
if processBlock(block_id):
Expand Down

0 comments on commit 5e2feb5

Please sign in to comment.