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 72f0e779c2df5520b118a49fe47cb9847d6ba54e
parent 9df5f33fa0753e56785ea72dca1e7a35b58b0444
Author: lash <dev@holbrook.no>
Date:   Thu, 31 Mar 2022 17:32:25 +0000

Forcen new session id on single flag

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

diff --git a/eth_monitor/runnable/sync.py b/eth_monitor/runnable/sync.py @@ -7,6 +7,7 @@ import logging import os import importlib import uuid +import datetime # external imports from chainlib.chain import ChainSpec @@ -116,9 +117,9 @@ override(config, 'renderer', env=os.environ, args=args) override(config, 'filter', env=os.environ, args=args) if config.get('_SESSION_ID') == None: - if not config.get('_SINGLE'): - #config.add('_SESSION_ID', str(uuid.uuid4()), True) - #else: + if config.get('_SINGLE'): + config.add(str(uuid.uuid4()), '_SESSION_ID', True) + else: config.add('default', '_SESSION_ID', True) logg.debug('loaded config:\n{}'.format(config)) @@ -257,7 +258,7 @@ def post_callback(): def block_callback(block, tx): - logg.debug('processing block {}'.format(block)) + logg.info('processing {} {}'.format(block, datetime.datetime.fromtimestamp(block.timestamp))) def main():