rippled
|
Public Member Functions | |
Sim () | |
Create a simulation. More... | |
PeerGroup | createGroup (std::size_t numPeers) |
Create a new group of peers. More... | |
std::size_t | size () const |
The number of peers in the simulation. More... | |
void | run (int ledgers) |
Run consensus protocol to generate the provided number of ledgers. More... | |
void | run (SimDuration const &dur) |
Run consensus for the given duration. More... | |
bool | synchronized (PeerGroup const &g) const |
Check whether all peers in the group are synchronized. More... | |
bool | synchronized () const |
Check whether all peers in the network are synchronized. More... | |
std::size_t | branches (PeerGroup const &g) const |
Calculate the number of branches in the group. More... | |
std::size_t | branches () const |
Calculate the number of branches in the network. More... | |
Public Attributes | |
std::mt19937_64 | rng |
Scheduler | scheduler |
BasicSink | sink |
beast::Journal | j |
LedgerOracle | oracle |
BasicNetwork< Peer * > | net |
TrustGraph< Peer * > | trustGraph |
CollectorRefs | collectors |
Private Attributes | |
std::deque< Peer > | peers |
PeerGroup | allPeers |
ripple::test::csf::Sim::Sim | ( | ) |
PeerGroup ripple::test::csf::Sim::createGroup | ( | std::size_t | numPeers | ) |
Create a new group of peers.
Creates a new group of peers. The peers do not have any trust relations or network connections by default. Those must be configured by the client.
numPeers | The number of peers in the group |
std::size_t ripple::test::csf::Sim::size | ( | ) | const |
void ripple::test::csf::Sim::run | ( | int | ledgers | ) |
void ripple::test::csf::Sim::run | ( | SimDuration const & | dur | ) |
bool ripple::test::csf::Sim::synchronized | ( | PeerGroup const & | g | ) | const |
bool ripple::test::csf::Sim::synchronized | ( | ) | const |
std::size_t ripple::test::csf::Sim::branches | ( | PeerGroup const & | g | ) | const |
std::size_t ripple::test::csf::Sim::branches | ( | ) | const |
|
private |
std::mt19937_64 ripple::test::csf::Sim::rng |
beast::Journal ripple::test::csf::Sim::j |
LedgerOracle ripple::test::csf::Sim::oracle |
BasicNetwork<Peer*> ripple::test::csf::Sim::net |
TrustGraph<Peer*> ripple::test::csf::Sim::trustGraph |
CollectorRefs ripple::test::csf::Sim::collectors |