commit bf166af544159e9c902e0255fd5402b6a1b6d2d6
parent 43f3aff255380a183e25e039b7fc1953af06c1b1
Author: lash <dev@holbrook.no>
Date: Sat, 14 May 2022 20:36:09 +0000
Fix crash in human tx render on null receipt, order of rpc in rpc settings process
Diffstat:
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/chainlib/eth/settings.py b/chainlib/eth/settings.py
@@ -16,6 +16,13 @@ def process_settings_rpc(settings, config):
rpc = chainlib.eth.cli.Rpc(settings.get('WALLET'))
conn = rpc.connect_by_config(config)
+ settings.set('CONN', conn)
+ settings.set('RPC_ID_GENERATOR', rpc.id_generator)
+ settings.set('RPC_SEND', config.true('_RPC_SEND'))
+
+ gas_oracle = rpc.get_gas_oracle()
+ settings.set('GAS_ORACLE', gas_oracle)
+
try:
settings.set('SIGNER', rpc.get_signer())
sender_address = rpc.get_sender_address()
@@ -25,16 +32,9 @@ def process_settings_rpc(settings, config):
except SignerMissingException:
pass
- gas_oracle = rpc.get_gas_oracle()
- settings.set('GAS_ORACLE', gas_oracle)
-
nonce_oracle = rpc.get_nonce_oracle()
settings.set('NONCE_ORACLE', nonce_oracle)
- settings.set('CONN', conn)
- settings.set('RPC_ID_GENERATOR', rpc.id_generator)
- settings.set('RPC_SEND', config.true('_RPC_SEND'))
-
return settings
@@ -93,6 +93,9 @@ def process_settings_contract(settings, config):
except KeyError:
return settings
+ if exec_address_in == None:
+ return settings
+
exec_address = to_checksum_address(exec_address_in)
if not config.true('_UNSAFE') and exec_address != exec_address_in:
raise ValueError('invalid checksum address: {}'.format(exec_address_in))
diff --git a/chainlib/eth/tx.py b/chainlib/eth/tx.py
@@ -749,13 +749,16 @@ input {}
self.payload,
)
- if self.status != Status.PENDING:
+ status = Status.UNKNOWN.name
+ logg.debug('selfstatus {}'.format(self.status))
+ if self.result != None and self.result.status != Status.PENDING:
s += """gas_used {}
""".format(
self.result.fee_cost,
+ status = self.result.status.name
)
- s += 'status ' + self.status.name + '\n'
+ s += 'status ' + status + '\n'
if self.block != None:
s += """block_number {}