chaind-eth

Queue server for ethereum
Log | Files | Refs | README | LICENSE

commit b875386845a8f1b01434357088ddf7cb9dbe7bf9
parent 8167d84419eb2f688b5577559144f1aca0e30cf1
Author: lash <dev@holbrook.no>
Date:   Sun, 10 Apr 2022 16:22:25 +0000

Avoid duplicate txs, start store before sync

Diffstat:
Mchaind/eth/runnable/syncer.py | 1+
Mchaind/eth/runnable/tasker.py | 4+++-
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/chaind/eth/runnable/syncer.py b/chaind/eth/runnable/syncer.py @@ -105,6 +105,7 @@ def main(): fltr = StateFilter(queue_adapter) sync_store = SyncFsStore(config.get('SESSION_RUNTIME_DIR'), session_id=config.get('SESSION_ID')) sync_store.register(fltr) + sync_store.start() chain_interface = EthChainInterface() drv = ChainInterfaceDriver(sync_store, chain_interface, offset=session_block_offset, target=block_limit) diff --git a/chaind/eth/runnable/tasker.py b/chaind/eth/runnable/tasker.py @@ -116,7 +116,9 @@ def main(): try: tx_hash = queue_adapter.put(r.hex()) - except Exception as e: + except DuplicateTxError as e: + logg.error('tx already exists as {}'.format(e)) + except ValueError as e: logg.error('adapter rejected input {}: "{}"'.format(r.hex(), e)) continue