1#include <test/csf/Sim.h>
12 p.targetLedgers = p.completedLedgers + ledgers;
40 Peer const* ref = g[0];
42 return p->lastClosedLedger.id() == ref->lastClosedLedger.id() &&
43 p->fullyValidatedLedger.id() == ref->fullyValidatedLedger.id();
58 for (
auto const& peer : g)
59 ledgers.
insert(peer->fullyValidatedLedger);
std::size_t branches(std::set< Ledger > const &ledgers) const
Determine the number of distinct branches for the set of ledgers.
A group of simulation Peers.
bool step_for(std::chrono::duration< Period, Rep > const &amount)
Run the scheduler until time has elapsed.
bool step()
Run the scheduler until no events remain.
std::size_t branches() const
Calculate the number of branches in the network.
void run(int ledgers)
Run consensus protocol to generate the provided number of ledgers.
bool synchronized() const
Check whether all peers in the network are synchronized.
typename SimClock::duration SimDuration
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
A single peer in the simulation.