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