Add get block eth websocket

This commit is contained in:
nolash
2021-02-03 21:57:26 +01:00
parent c0e4ab5c2c
commit a414f0ed5b
6 changed files with 34 additions and 22 deletions

View File

@@ -97,9 +97,7 @@ chain = args.i
def main():
block_offset = c.block_number()
logg.debug('block offset {}'.format(block_offset))
syncer_backend = SyncerBackend.live(chain, block_offset+1)
syncer = HeadSyncer(syncer_backend)
@@ -113,7 +111,8 @@ def main():
syncer.filter.append(task_pair)
try:
syncer.loop(int(config.get('SYNCER_LOOP_INTERVAL')))
logg.debug('block offset {} {}'.format(block_offset, c))
syncer.loop(int(config.get('SYNCER_LOOP_INTERVAL')), c)
except LoopDone as e:
sys.stderr.write("sync '{}' done at block {}\n".format(args.mode, e))