Determine the preferred ledger based on its support.
template< class ID> ID getPreferredLedger( ID const& current, hash_map< ID, std::uint32_t > const& dist);
Name |
Description |
---|---|
|
The current ledger the node follows |
|
Ledger IDs and corresponding counts of support |
The ID of the ledger with most support, preferring to stick with current ledger in the case of equal support
#include <ripple/consensus/Validations.h>