Kagome
Polkadot Runtime Engine in C++17
kagome::network::StreamEngine::RandomGossipStrategy< Rng > Struct Template Reference

#include <stream_engine.hpp>

Collaboration diagram for kagome::network::StreamEngine::RandomGossipStrategy< Rng >:

Public Member Functions

 RandomGossipStrategy (const int candidates_num, const int lucky_peers_num)
 
bool operator() (const PeerId &)
 

Private Attributes

Rng gen_
 
int candidates_num_
 
Rng::result_type threshold_
 

Detailed Description

template<typename Rng = std::mt19937>
struct kagome::network::StreamEngine::RandomGossipStrategy< Rng >

Definition at line 57 of file stream_engine.hpp.

Constructor & Destructor Documentation

template<typename Rng = std::mt19937>
kagome::network::StreamEngine::RandomGossipStrategy< Rng >::RandomGossipStrategy ( const int  candidates_num,
const int  lucky_peers_num 
)
inline

Definition at line 58 of file stream_engine.hpp.

Member Function Documentation

template<typename Rng = std::mt19937>
bool kagome::network::StreamEngine::RandomGossipStrategy< Rng >::operator() ( const PeerId )
inline

Definition at line 66 of file stream_engine.hpp.

Member Data Documentation

template<typename Rng = std::mt19937>
int kagome::network::StreamEngine::RandomGossipStrategy< Rng >::candidates_num_
private

Definition at line 73 of file stream_engine.hpp.

template<typename Rng = std::mt19937>
Rng kagome::network::StreamEngine::RandomGossipStrategy< Rng >::gen_
private

Definition at line 72 of file stream_engine.hpp.

template<typename Rng = std::mt19937>
Rng::result_type kagome::network::StreamEngine::RandomGossipStrategy< Rng >::threshold_
private

Definition at line 74 of file stream_engine.hpp.


The documentation for this struct was generated from the following file: