eth-monitor

Monitor and cache ethereum transactions with match filters
git clone git://git.defalsify.org/eth-monitor.git
Log | Files | Refs | README | LICENSE

commit c760c3800cac08ae108f510e92fca7903c5f1fd2
parent aabc632d8d8b741a9e28b9226feb66b51ec3bb72
Author: lash <dev@holbrook.no>
Date:   Sun, 27 Feb 2022 14:21:09 +0000

Implement 'fresh' flag

Diffstat:
Meth_monitor/runnable/sync.py | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/eth_monitor/runnable/sync.py b/eth_monitor/runnable/sync.py @@ -358,15 +358,18 @@ def main(): out_filter = OutFilter(chain_spec, rules_filter=address_rules, renderers=renderers_mods) filters.append(out_filter) - - cache_rpc = CacheRPC(rpc, store) + + use_rpc = rpc + if not args.fresh: + use_rpc = CacheRPC(rpc, store) + i = 0 for syncer in syncers: logg.info('running syncer index {} {}'.format(i, str(syncer))) for f in filters: syncer.add_filter(f) - r = syncer.loop(int(config.get('SYNCER_LOOP_INTERVAL')), cache_rpc) + r = syncer.loop(int(config.get('SYNCER_LOOP_INTERVAL')), use_rpc) sys.stderr.write("sync {} done at block {}\n".format(syncer, r)) i += 1