def initial_wait_time(self):
"""Return the initial wait time if config setting exists and is valid,
otherwise return the default.
The initial wait time is used during the bootstrapping of the block-
chain to compute the local mean for wait timers until there are at
least population_estimate_sample_size PoET blocks in the blockchain.
"""
if self._initial_wait_time is None:
self._initial_wait_time = \
self._get_config_setting(
name='sawtooth.poet.initial_wait_time',
value_type=float,
default_value=PoetSettingsView._INITIAL_WAIT_TIME_,
validate_function=lambda value:
math.isfinite(value) and value >= 0)
return self._initial_wait_time
评论列表
文章目录