From 24a71b6c7f37de51ccd40f414a47dc7a44dda350 Mon Sep 17 00:00:00 2001 From: lash Date: Wed, 27 Apr 2022 09:01:46 +0000 Subject: [PATCH] Make sure syncer doesnt croak on invalidstate --- chaind/eth/runnable/send.py | 6 +++--- chaind/eth/token/base.py | 2 +- requirements.txt | 2 +- setup.cfg | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/chaind/eth/runnable/send.py b/chaind/eth/runnable/send.py index 013826b..6ea3ac9 100644 --- a/chaind/eth/runnable/send.py +++ b/chaind/eth/runnable/send.py @@ -34,7 +34,7 @@ arg_flags = chainlib.eth.cli.argflag_std_write argparser = chainlib.eth.cli.ArgumentParser(arg_flags, arg_long={'-s': '--send-rpc'}) argparser.add_positional('source', required=False, type=str, help='Transaction source file') -local_arg_flags = chaind.cli.argflag_local_socket_client +local_arg_flags = chaind.cli.argflag_local_socket_client | chaind.cli.ChaindFlag.TOKEN chaind.cli.process_flags(argparser, local_arg_flags) args = argparser.parse_args() @@ -105,9 +105,9 @@ class SocketSender: def main(): token_resolver = None - if config.get('TOKEN_MODULE') != None: + if settings.get('TOKEN_MODULE') != None: import importlib - m = importlib.import_module(config.get('TOKEN_MODULE')) + m = importlib.import_module(settings.get('TOKEN_MODULE')) m = m.TokenResolver else: from chaind.eth.token.gas import GasTokenResolver diff --git a/chaind/eth/token/base.py b/chaind/eth/token/base.py index 5559859..5f32485 100644 --- a/chaind/eth/token/base.py +++ b/chaind/eth/token/base.py @@ -28,7 +28,7 @@ class BaseTokenResolver: def get_values(self, gas_value, value, executable_address=None): - nonce = self.nonce_oracle.next_nonce() + nonce = self.nonce_oracle.get_nonce() if executable_address == None: return (value, 0, nonce) diff --git a/requirements.txt b/requirements.txt index b5321a6..a7edbc8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -chaind~=0.1.0 +chaind~=0.1.1 hexathon~=0.1.5 chainlib-eth~=0.1.0 pyxdg~=0.27 diff --git a/setup.cfg b/setup.cfg index 6f17d0e..addb068 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = chaind-eth -version = 0.1.0 +version = 0.1.3 description = Queue server for ethereum author = Louis Holbrook author_email = dev@holbrook.no @@ -31,6 +31,7 @@ packages = chaind.eth chaind.eth.runnable chaind.eth.cli + chaind.eth.token [options.entry_points] console_scripts =