Determine the preferred last closed ledger for the next consensus round.
ID getPreferredLCL( Ledger const& lcl, Seq minSeq, hash_map< ID, std::uint32_t > const& peerCounts);
Called before starting the next round of ledger consensus to determine the preferred working ledger. Uses the dominant peerCount ledger if no trusted validations are available.
Name |
Description |
---|---|
|
Last closed ledger by this node |
|
Minimum allowed sequence number of the trusted preferred ledger |
|
Map from ledger ids to count of peers with that as the last closed ledger |
The preferred last closed ledger ID
The minSeq does not apply to the peerCounts, since this function does not know their sequence number