Kagome
Polkadot Runtime Engine in C++17
threshold_util.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CORE_CONSENSUS_BABE_IMPL_THRESHOLD_UTIL_HPP
7 #define KAGOME_CORE_CONSENSUS_BABE_IMPL_THRESHOLD_UTIL_HPP
8 
10 #include "primitives/authority.hpp"
11 
12 namespace kagome::consensus {
13 
18  Threshold calculateThreshold(const std::pair<uint64_t, uint64_t> &ratio,
19  const primitives::AuthorityList &authorities,
20  primitives::AuthorityIndex authority_index);
21 
22 } // namespace kagome::consensus
23 
24 #endif // KAGOME_CORE_CONSENSUS_BABE_IMPL_THRESHOLD_UTIL_HPP
uint32_t AuthorityIndex
Definition: authority.hpp:36
Threshold calculateThreshold(const std::pair< uint64_t, uint64_t > &ratio, const primitives::AuthorityList &authorities, primitives::AuthorityIndex authority_index)
common::SLVector< Authority, consensus::kMaxValidatorsNumber > AuthorityList
Definition: authority.hpp:52
crypto::VRFThreshold Threshold
threshold, which must not be exceeded for the party to be a slot leader
Definition: common.hpp:33