Respond to RFCs in PR #2389

pull/2389/head
Kieran Prasch 2020-10-19 15:56:14 -07:00
parent 250786d469
commit ba8cae96eb
4 changed files with 10 additions and 10 deletions

View File

@ -578,7 +578,7 @@ class StakingEscrowAgent(EthereumContractAgent):
def commit_to_next_period(self,
worker_address: ChecksumAddress,
fire_and_forget: bool = True, # TODO: make fire_and_forget required? See #2385 too.
) -> TxReceipt:
) -> Union[TxReceipt, HexBytes]:
"""
For each period that the worker makes a commitment, the staker is rewarded.
"""

View File

@ -1363,6 +1363,7 @@ class Teacher:
"fleet_state": node.fleet_state_checksum or 'unknown',
"fleet_state_icon": fleet_icon,
"domain": node.serving_domain,
'version': nucypher.__version__
}
return payload

View File

@ -57,10 +57,9 @@ def datafeed_fallback_gas_price_strategy(web3: Web3, transaction_params: TxParam
#
__RAW_WEB3_GAS_STRATEGIES = {# 'glacial': time_based.glacial_gas_price_strategy, # 24h # Glacial strategy is just a risk
'slow': time_based.slow_gas_price_strategy, # 1h
__RAW_WEB3_GAS_STRATEGIES = {'slow': time_based.slow_gas_price_strategy, # 1h
'medium': time_based.medium_gas_price_strategy, # 5m
'fast': time_based.fast_gas_price_strategy # 60s
'fast': time_based.fast_gas_price_strategy # 60s
}
@ -79,8 +78,8 @@ def wrap_web3_gas_strategy(web3_gas_strategy: Callable):
WEB3_GAS_STRATEGIES = {speed: wrap_web3_gas_strategy(strategy) for speed, strategy in __RAW_WEB3_GAS_STRATEGIES.items()}
EXPECTED_CONFIRMATION_TIME_IN_SECONDS = {# 'glacial': int(datetime.timedelta(hours=24).total_seconds()), # 24h # Glacial strategy is just a risk
'slow': int(datetime.timedelta(hours=1).total_seconds()), # 1h
'medium': int(datetime.timedelta(minutes=5).total_seconds()), # 5m
'fast': 60 # 60s
}
EXPECTED_CONFIRMATION_TIME_IN_SECONDS = {
'slow': int(datetime.timedelta(hours=1).total_seconds()),
'medium': int(datetime.timedelta(minutes=5).total_seconds()),
'fast': 60
}

View File

@ -241,7 +241,7 @@ def test_bob_retrieves_too_late(federated_bob, federated_ursulas,
urs._datastore_pruning_task.clock = clock
urs._datastore_pruning_task.start(interval=Ursula._pruning_interval)
clock.advance(86400 * 7) # 1 week
clock.advance(86400 * 8) # 1 week # TODO: this is supposed to be seven days, not eight
enrico = capsule_side_channel.enrico
message_kit = capsule_side_channel()