mirror of
https://github.com/twisterarmy/twister-data-guard.git
synced 2025-03-12 05:22:56 +00:00
commit missed updates for 72f351522a05158a59b1565df1af4f53ddae137e
This commit is contained in:
parent
72f351522a
commit
b435a79658
@ -17,7 +17,7 @@ blocksInStep = 100 # blocks processing by the one step
|
||||
squattersStop = 20 # max users per block. Reset the blocksInStep on this quantity to prevent CPU overload
|
||||
|
||||
class MyDb:
|
||||
nextBlockHash = False
|
||||
nextBlock = 0
|
||||
|
||||
try:
|
||||
from bitcoinrpc.authproxy import AuthServiceProxy
|
||||
@ -42,7 +42,8 @@ print "blockchain reading..."
|
||||
|
||||
while True:
|
||||
|
||||
block = twister.getblock(db.nextBlockHash)
|
||||
hash = twister.getblockhash(db.nextBlock)
|
||||
block = twister.getblock(hash)
|
||||
|
||||
if squattersStopCurrent < 0:
|
||||
break
|
||||
@ -63,7 +64,7 @@ while True:
|
||||
|
||||
if block.has_key("nextblockhash"):
|
||||
|
||||
db.nextBlockHash = block["nextblockhash"]
|
||||
db.nextBlock = db.nextBlock + 1
|
||||
|
||||
print "save block state."
|
||||
cPickle.dump(db, open(dbFileName, "w"))
|
||||
@ -73,6 +74,3 @@ while True:
|
||||
break
|
||||
|
||||
print "task completed."
|
||||
|
||||
else:
|
||||
print "operation locked by the running process."
|
||||
|
Loading…
x
Reference in New Issue
Block a user