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
1 changed files with 2 additions and 0 deletions

View File

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