Merge pull request #1911 from rllola/zeroname-fix-waitforblock
Zeroname fix waitforblock
This commit is contained in:
commit
383749a9c0
1 changed files with 8 additions and 2 deletions
|
@ -216,7 +216,10 @@ while 1:
|
|||
while 1:
|
||||
try:
|
||||
time.sleep(1)
|
||||
rpc.waitforblock()
|
||||
if node_version < 160000 :
|
||||
rpc.waitforblock()
|
||||
else:
|
||||
rpc.waitfornewblock()
|
||||
print "Found"
|
||||
break # Block found
|
||||
except socket.timeout: # Timeout
|
||||
|
@ -227,7 +230,10 @@ while 1:
|
|||
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):
|
||||
|
|
Loading…
Reference in a new issue