poet_settings_view.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:sawtooth-core 作者: hyperledger 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号