From a4a656707c938f26da565e4d1f3a7b92c7d3bfc0 Mon Sep 17 00:00:00 2001 From: nolash Date: Wed, 1 Sep 2021 18:43:21 +0200 Subject: [PATCH] Restore session worker in gas task tests --- apps/cic-eth/cic_eth/eth/gas.py | 3 +-- apps/cic-eth/tests/task/test_task_gas.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/cic-eth/cic_eth/eth/gas.py b/apps/cic-eth/cic_eth/eth/gas.py index f866d108..40f569af 100644 --- a/apps/cic-eth/cic_eth/eth/gas.py +++ b/apps/cic-eth/cic_eth/eth/gas.py @@ -183,8 +183,7 @@ def check_gas(self, tx_hashes_hex, chain_spec_dict, txs_hex=[], address=None, ga if not is_checksum_address(address): raise ValueError('invalid address {}'.format(address)) address = tx_normalize.wallet_address(address) - - address = add_0x(address) + address = add_0x(address) tx_hashes = [] txs = [] diff --git a/apps/cic-eth/tests/task/test_task_gas.py b/apps/cic-eth/tests/task/test_task_gas.py index 1a8669d8..f69a2dd2 100644 --- a/apps/cic-eth/tests/task/test_task_gas.py +++ b/apps/cic-eth/tests/task/test_task_gas.py @@ -75,7 +75,7 @@ def test_task_check_gas_ok( 'cic_eth.eth.gas.check_gas', [ [ - tx_hash_hex, + strip_0x(tx_hash_hex), ], default_chain_spec.asdict(), [], @@ -283,4 +283,3 @@ def test_task_resend_explicit( tx_after = unpack(bytes.fromhex(strip_0x(otx.signed_tx)), default_chain_spec) logg.debug('gasprices before {} after {}'.format(tx_before['gasPrice'], tx_after['gasPrice'])) assert tx_after['gasPrice'] > tx_before['gasPrice'] -