def target_wait_time(self):
"""Return the target wait time if config setting exists and is valid,
otherwise return the default.
The target wait time is the desired average amount of time, across all
validators in the network, a validator must wait before attempting to
claim a block.
"""
if self._target_wait_time is None:
self._target_wait_time = \
self._get_config_setting(
name='sawtooth.poet.target_wait_time',
value_type=float,
default_value=PoetSettingsView._TARGET_WAIT_TIME_,
validate_function=lambda value:
math.isfinite(value) and value > 0)
return self._target_wait_time
评论列表
文章目录