Determines whether the current ledger should close at this time.
bool shouldCloseLedger( bool anyTransactions, std::size_t prevProposers, std::size_t proposersClosed, std::size_t proposersValidated, std::chrono::milliseconds prevRoundTime, std::chrono::milliseconds timeSincePrevClose, std::chrono::milliseconds openTime, std::chrono::milliseconds idleInterval, ConsensusParms const& parms, 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 |
|
duration this ledger has been open |
|
the network's desired idle interval |
|
|6|Consensus constant parameters |
|
journal for logging |
#include <ripple/consensus/Consensus.h>