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