Rewording of newsfragments and exception message. Add some TODOs.

pull/2425/head
David Núñez 2020-11-07 01:15:47 +01:00
parent d0334e029c
commit b051457e83
4 changed files with 5 additions and 5 deletions

View File

@ -1,2 +1 @@
In the Worker's commitment tracker, the logic to check for what's the current period should happen before the logic to track pending transactions.
Otherwise, it's possible to try to fire a replacement transaction in the context of a different period.
Fixes logical bug in ``WorkTracker`` to ensure commitment transactions can only be issued once per period.

View File

@ -280,7 +280,7 @@ class BlockchainInterface:
self.client.inject_middleware(geth_poa_middleware, layer=0)
self.client.add_middleware(middleware.time_based_cache_middleware)
# self.client.add_middleware(middleware.latest_block_based_cache_middleware)
# self.client.add_middleware(middleware.latest_block_based_cache_middleware) # TODO: This line causes failed tests and nonce reuse in tests. See #2348.
self.client.add_middleware(middleware.simple_cache_middleware)
self.set_gas_strategy()

View File

@ -272,7 +272,7 @@ class TransactingStakerOptions:
def get_blockchain(self):
blockchain = self.staker_options.get_blockchain()
if self.gas_price:
if self.gas_price: # TODO: Consider performing this step in the init of EthereumClient
fixed_price_strategy = construct_fixed_price_gas_strategy(gas_price=self.gas_price, denomination="gwei")
blockchain.set_gas_strategy(fixed_price_strategy)
return blockchain

View File

@ -73,7 +73,8 @@ def wrap_web3_gas_strategy(speed: Optional[str] = None):
try:
return web3_gas_strategy(*args, **kwargs)
except ValidationError as e:
raise GasStrategyError("Calling the web3 gas strategy failed, probably due to an unsynced chain.") from e
raise GasStrategyError(f"Calling the '{speed}' web3 gas strategy failed. "
f"Verify your Ethereum provider connection and syncing status.") from e
_wrapper.name = speed