Determines whether the current ledger should close at this time.
bool shouldCloseLedger( bool anyTransactions, std::size_t previousProposers, std::size_t proposersClosed, std::size_t proposersValidated, std::chrono::milliseconds previousTime, std::chrono::milliseconds currentTime, std::chrono::milliseconds openTime, std::chrono::seconds idleInterval, beast::Journal j);
This function should be called when a ledger is open and there is no close in progress, or when a transaction is received and no close is in progress.
Name |
Description |
---|---|
|
indicates whether any transactions have been received |
|
proposers in the last closing |
|
proposers who have currently closed this ledger |
|
proposers who have validated the last closed ledger |
|
time for the previous ledger to reach consensus |
|
time since the previous ledger's (possibly rounded) close time |
|
time waiting to close this ledger |
|
the network's desired idle interval |
|
journal for logging |
#include <ripple/consensus/LedgerTiming.h>