PrevUpHomeNext
Validations::getPreferred (1 of 2 overloads)

Return the sequence number and ID of the preferred working ledger.

Synopsis
std::pair< Seq, ID >
getPreferred(
    Ledger const& currLedger);
Description

A ledger is preferred if it has more support amongst trusted validators and is not an ancestor of the current working ledger; otherwise it remains the current working ledger.

Parameters

Name

Description

currLedger

The local nodes current working ledger

Return Value

The sequence and id of the preferred working ledger, or Seq{0},ID{} if no trusted validations are available to determine the preferred ledger.


PrevUpHomeNext