chaind-eth

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

commit 42aa809500277e8e28a8949813c62468de34e01f
parent e31367853c4497fa41e71af1d1054aa5b8e64f2b
Author: lash <dev@holbrook.no>
Date:   Mon,  2 May 2022 09:59:50 +0000

Defer processing backend error handling to parent

Diffstat:
Mchaind/eth/runnable/queuer.py | 20++++++--------------
Mrequirements.txt | 2+-
Msetup.cfg | 2+-
Mtests/test_tx.py | 2+-
4 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/chaind/eth/runnable/queuer.py b/chaind/eth/runnable/queuer.py @@ -70,20 +70,12 @@ logg.debug('settings:\n{}'.format(settings)) def process_outgoing(chain_spec, adapter, rpc, limit=50): adapter = None process_err = None - for i in range(2): - try: - adapter = ChaindFsAdapter( - settings.get('CHAIN_SPEC'), - settings.dir_for('queue'), - EthCacheTx, - dispatcher, - ) - except BackendIntegrityError as e: - process_err = e - continue - - if adapter == None: - raise BackendIntegrityError(process_err) + adapter = ChaindFsAdapter( + settings.get('CHAIN_SPEC'), + settings.dir_for('queue'), + EthCacheTx, + dispatcher, + ) upcoming = adapter.upcoming(limit=limit) logg.info('processor has {} candidates for {}, processing with limit {} adapter {} rpc {}'.format(len(upcoming), chain_spec, limit, adapter, rpc)) diff --git a/requirements.txt b/requirements.txt @@ -1,4 +1,4 @@ -chaind~=0.2.0 +chaind~=0.2.2 hexathon~=0.1.5 chainlib-eth~=0.1.1 pyxdg~=0.27 diff --git a/setup.cfg b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = chaind-eth -version = 0.2.0 +version = 0.2.1 description = Queue server for ethereum author = Louis Holbrook author_email = dev@holbrook.no diff --git a/tests/test_tx.py b/tests/test_tx.py @@ -11,7 +11,7 @@ from chainlib.chain import ChainSpec from chainqueue.cache import CacheTokenTx from chainlib.error import RPCException from chainlib.status import Status as TxStatus -from chaind.unittest.common import TestChaindFsBase +from chaind.unittest.fs import TestChaindFsBase from chaind.driver import QueueDriver from chaind.filter import StateFilter from chainlib.eth.gas import Gas