Avoid duplicate txs, start store before sync
This commit is contained in:
parent
8167d84419
commit
b875386845
@ -105,6 +105,7 @@ def main():
|
|||||||
fltr = StateFilter(queue_adapter)
|
fltr = StateFilter(queue_adapter)
|
||||||
sync_store = SyncFsStore(config.get('SESSION_RUNTIME_DIR'), session_id=config.get('SESSION_ID'))
|
sync_store = SyncFsStore(config.get('SESSION_RUNTIME_DIR'), session_id=config.get('SESSION_ID'))
|
||||||
sync_store.register(fltr)
|
sync_store.register(fltr)
|
||||||
|
sync_store.start()
|
||||||
|
|
||||||
chain_interface = EthChainInterface()
|
chain_interface = EthChainInterface()
|
||||||
drv = ChainInterfaceDriver(sync_store, chain_interface, offset=session_block_offset, target=block_limit)
|
drv = ChainInterfaceDriver(sync_store, chain_interface, offset=session_block_offset, target=block_limit)
|
||||||
|
@ -116,7 +116,9 @@ def main():
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
tx_hash = queue_adapter.put(r.hex())
|
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))
|
logg.error('adapter rejected input {}: "{}"'.format(r.hex(), e))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user