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'))
|
rpc = chainlib.eth.cli.Rpc(settings.get('WALLET'))
|
||||||
conn = rpc.connect_by_config(config)
|
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:
|
try:
|
||||||
settings.set('SIGNER', rpc.get_signer())
|
settings.set('SIGNER', rpc.get_signer())
|
||||||
sender_address = rpc.get_sender_address()
|
sender_address = rpc.get_sender_address()
|
||||||
@ -25,16 +32,9 @@ def process_settings_rpc(settings, config):
|
|||||||
except SignerMissingException:
|
except SignerMissingException:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
gas_oracle = rpc.get_gas_oracle()
|
|
||||||
settings.set('GAS_ORACLE', gas_oracle)
|
|
||||||
|
|
||||||
nonce_oracle = rpc.get_nonce_oracle()
|
nonce_oracle = rpc.get_nonce_oracle()
|
||||||
settings.set('NONCE_ORACLE', 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
|
return settings
|
||||||
|
|
||||||
|
|
||||||
@ -93,6 +93,9 @@ def process_settings_contract(settings, config):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
return settings
|
return settings
|
||||||
|
|
||||||
|
if exec_address_in == None:
|
||||||
|
return settings
|
||||||
|
|
||||||
exec_address = to_checksum_address(exec_address_in)
|
exec_address = to_checksum_address(exec_address_in)
|
||||||
if not config.true('_UNSAFE') and exec_address != exec_address_in:
|
if not config.true('_UNSAFE') and exec_address != exec_address_in:
|
||||||
raise ValueError('invalid checksum address: {}'.format(exec_address_in))
|
raise ValueError('invalid checksum address: {}'.format(exec_address_in))
|
||||||
|
@ -749,13 +749,16 @@ input {}
|
|||||||
self.payload,
|
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 {}
|
s += """gas_used {}
|
||||||
""".format(
|
""".format(
|
||||||
self.result.fee_cost,
|
self.result.fee_cost,
|
||||||
|
status = self.result.status.name
|
||||||
)
|
)
|
||||||
|
|
||||||
s += 'status ' + self.status.name + '\n'
|
s += 'status ' + status + '\n'
|
||||||
|
|
||||||
if self.block != None:
|
if self.block != None:
|
||||||
s += """block_number {}
|
s += """block_number {}
|
||||||
|
Loading…
Reference in New Issue
Block a user