LCOV - code coverage report
Current view: top level - irohad/multi_sig_transactions - gossip_propagation_strategy_params.hpp (source / functions) Hit Total Coverage
Test: coverage_cleared.info Lines: 2 2 100.0 %
Date: 2018-12-05 17:11:35 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /**
       2             :  * Copyright Soramitsu Co., Ltd. All Rights Reserved.
       3             :  * SPDX-License-Identifier: Apache-2.0
       4             :  */
       5             : 
       6             : #ifndef IROHA_GOSSIP_PROPAGATION_STRATEGY_PARAMS_HPP
       7             : #define IROHA_GOSSIP_PROPAGATION_STRATEGY_PARAMS_HPP
       8             : 
       9             : #include <chrono>
      10             : 
      11             : #include <boost/optional.hpp>
      12             : 
      13             : // TODO: IR-1317 @l4l (02/05/18) magics should be replaced with options via
      14             : // cli parameters
      15             : static constexpr std::chrono::milliseconds kDefaultPeriod =
      16             : std::chrono::seconds(5);
      17             : static constexpr uint32_t kDefaultAmount = 2;
      18             : 
      19             : namespace iroha {
      20             :   /**
      21             :    * This structure provides configuration parameters for propagation strategy
      22             :    */
      23             :   struct GossipPropagationStrategyParams {
      24             :     /// period of emitting data in ms
      25           5 :     std::chrono::milliseconds emission_period{kDefaultPeriod};
      26             : 
      27             :     /// amount of data (peers) emitted per once
      28           5 :     uint32_t amount_per_once{kDefaultAmount};
      29             :   };
      30             : 
      31             : }  // namespace iroha
      32             : 
      33             : #endif  // IROHA_GOSSIP_PROPAGATION_STRATEGY_PARAMS_HPP

Generated by: LCOV version 1.13