Dont reconnect on every block
This commit is contained in:
parent
915dd92b5a
commit
faa2c3e6ce
1 changed files with 1 additions and 1 deletions
|
@ -173,7 +173,6 @@ while 1:
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
while 1:
|
while 1:
|
||||||
try:
|
try:
|
||||||
rpc = AuthServiceProxy(rpc_auth, timeout=rpc_timeout)
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
rpc.waitforblock()
|
rpc.waitforblock()
|
||||||
print "Found"
|
print "Found"
|
||||||
|
@ -184,6 +183,7 @@ while 1:
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
print "Exception", err.__class__, err
|
print "Exception", err.__class__, err
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
rpc = AuthServiceProxy(rpc_auth, timeout=rpc_timeout)
|
||||||
|
|
||||||
last_block = int(rpc.getinfo()["blocks"])
|
last_block = int(rpc.getinfo()["blocks"])
|
||||||
should_publish = False
|
should_publish = False
|
||||||
|
|
Loading…
Reference in a new issue