Fix crash in human tx render on null receipt, order of rpc in rpc settings process
This commit is contained in:
parent
43f3aff255
commit
bf166af544
@ -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))
|
||||
|
@ -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 {}
|
||||
|
Loading…
Reference in New Issue
Block a user