Improve terminal output
This commit is contained in:
parent
1ea196d04b
commit
2f22d6df1a
@ -43,18 +43,21 @@ class MinedSyncer(Syncer):
|
||||
|
||||
|
||||
def loop(self, interval, getter):
|
||||
while self.running and Syncer.running_global:
|
||||
g = self.backend.get()
|
||||
start_tx = g[1]
|
||||
self.progress_callback('loop awakened', g[0], start_tx)
|
||||
last_tx = g[1]
|
||||
last_block = g[0]
|
||||
self.progress_callback('loop started', last_block, last_tx)
|
||||
while self.running and Syncer.running_global:
|
||||
while True:
|
||||
block = self.get(getter)
|
||||
if block == None:
|
||||
break
|
||||
last_block = block.number
|
||||
self.process(getter, block)
|
||||
self.progress_callback('process block {}'.format(self.backend.get()), block.number, start_tx)
|
||||
start_tx = 0
|
||||
self.progress_callback('processed block {}'.format(self.backend.get()), last_block, last_tx)
|
||||
time.sleep(self.yield_delay)
|
||||
#self.progress_callback('loop ended', last_block + 1, last_tx)
|
||||
time.sleep(interval)
|
||||
|
||||
|
||||
|
@ -5,4 +5,4 @@ eth-tester==0.5.0b3
|
||||
confini==0.3.6b2
|
||||
semver==2.13.0
|
||||
hexathon==0.0.1a2
|
||||
chainlib~=0.0.1a6
|
||||
chainlib~=0.0.1a7
|
||||
|
Loading…
Reference in New Issue
Block a user