Handle duplicate tx exception

This commit is contained in:
lash 2022-04-10 16:45:58 +00:00
parent b875386845
commit 9cd89f4a83
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746

View File

@ -17,6 +17,7 @@ from chainqueue import (
Store,
Status,
)
from chainqueue.error import DuplicateTxError
from chainqueue.store.fs import (
IndexStore,
CounterStore,
@ -118,6 +119,7 @@ def main():
tx_hash = queue_adapter.put(r.hex())
except DuplicateTxError as e:
logg.error('tx already exists as {}'.format(e))
continue
except ValueError as e:
logg.error('adapter rejected input {}: "{}"'.format(r.hex(), e))
continue