|
rippled
|
Manages the generic consensus algorithm for use by the RCL. More...

Classes | |
| class | Adaptor |
Public Member Functions | |
| RCLConsensus (Application &app, std::unique_ptr< FeeVote > &&feeVote, LedgerMaster &ledgerMaster, LocalTxs &localTxs, InboundTransactions &inboundTransactions, Consensus< Adaptor >::clock_type &clock, ValidatorKeys const &validatorKeys, beast::Journal journal) | |
| Constructor. More... | |
| RCLConsensus (RCLConsensus const &)=delete | |
| RCLConsensus & | operator= (RCLConsensus const &)=delete |
| bool | validating () const |
| Whether we are validating consensus ledgers. More... | |
| std::size_t | prevProposers () const |
| Get the number of proposing peers that participated in the previous round. More... | |
| std::chrono::milliseconds | prevRoundTime () const |
| Get duration of the previous round. More... | |
| ConsensusMode | mode () const |
| ConsensusPhase | phase () const |
| Json::Value | getJson (bool full) const |
| void | startRound (NetClock::time_point const &now, RCLCxLedger::ID const &prevLgrId, RCLCxLedger const &prevLgr, hash_set< NodeID > const &nowUntrusted, hash_set< NodeID > const &nowTrusted) |
| Adjust the set of trusted validators and kick-off the next round of consensus. More... | |
| void | timerEntry (NetClock::time_point const &now) |
| void | gotTxSet (NetClock::time_point const &now, RCLTxSet const &txSet) |
| RCLCxLedger::ID | prevLedgerID () const |
| void | simulate (NetClock::time_point const &now, std::optional< std::chrono::milliseconds > consensusDelay) |
| bool | peerProposal (NetClock::time_point const &now, RCLCxPeerPos const &newProposal) |
| ConsensusParms const & | parms () const |
| std::optional< std::chrono::milliseconds > | getTimerDelay () const |
| void | setTimerDelay (std::optional< std::chrono::milliseconds > td=std::nullopt) |
Private Attributes | |
| Adaptor | adaptor_ |
| Consensus< Adaptor > | consensus_ |
| const beast::Journal | j_ |
Static Private Attributes | |
| constexpr static unsigned int | censorshipWarnInternal = 15 |
| Warn for transactions that haven't been included every so many ledgers. More... | |
Manages the generic consensus algorithm for use by the RCL.
Definition at line 54 of file RCLConsensus.h.
| ripple::RCLConsensus::RCLConsensus | ( | Application & | app, |
| std::unique_ptr< FeeVote > && | feeVote, | ||
| LedgerMaster & | ledgerMaster, | ||
| LocalTxs & | localTxs, | ||
| InboundTransactions & | inboundTransactions, | ||
| Consensus< Adaptor >::clock_type & | clock, | ||
| ValidatorKeys const & | validatorKeys, | ||
| beast::Journal | journal | ||
| ) |
Constructor.
Definition at line 52 of file RCLConsensus.cpp.
|
delete |
|
delete |
| bool ripple::RCLConsensus::validating | ( | ) | const |
Whether we are validating consensus ledgers.
Definition at line 562 of file RCLConsensus.h.
| std::size_t ripple::RCLConsensus::prevProposers | ( | ) | const |
Get the number of proposing peers that participated in the previous round.
Definition at line 570 of file RCLConsensus.h.
| std::chrono::milliseconds ripple::RCLConsensus::prevRoundTime | ( | ) | const |
Get duration of the previous round.
The duration of the round is the establish phase, measured from closing the open ledger to accepting the consensus result.
Definition at line 583 of file RCLConsensus.h.
| ConsensusMode ripple::RCLConsensus::mode | ( | ) | const |
Definition at line 590 of file RCLConsensus.h.
| ConsensusPhase ripple::RCLConsensus::phase | ( | ) | const |
Definition at line 596 of file RCLConsensus.h.
| Json::Value ripple::RCLConsensus::getJson | ( | bool | full | ) | const |
Definition at line 924 of file RCLConsensus.cpp.
| void ripple::RCLConsensus::startRound | ( | NetClock::time_point const & | now, |
| RCLCxLedger::ID const & | prevLgrId, | ||
| RCLCxLedger const & | prevLgr, | ||
| hash_set< NodeID > const & | nowUntrusted, | ||
| hash_set< NodeID > const & | nowTrusted | ||
| ) |
Adjust the set of trusted validators and kick-off the next round of consensus.
For more details,
Definition at line 1084 of file RCLConsensus.cpp.
| void ripple::RCLConsensus::timerEntry | ( | NetClock::time_point const & | now | ) |
Definition at line 936 of file RCLConsensus.cpp.
| void ripple::RCLConsensus::gotTxSet | ( | NetClock::time_point const & | now, |
| RCLTxSet const & | txSet | ||
| ) |
Definition at line 952 of file RCLConsensus.cpp.
| RCLCxLedger::ID ripple::RCLConsensus::prevLedgerID | ( | ) | const |
Definition at line 626 of file RCLConsensus.h.
| void ripple::RCLConsensus::simulate | ( | NetClock::time_point const & | now, |
| std::optional< std::chrono::milliseconds > | consensusDelay | ||
| ) |
Definition at line 970 of file RCLConsensus.cpp.
| bool ripple::RCLConsensus::peerProposal | ( | NetClock::time_point const & | now, |
| RCLCxPeerPos const & | newProposal | ||
| ) |
Definition at line 979 of file RCLConsensus.cpp.
| ConsensusParms const& ripple::RCLConsensus::parms | ( | ) | const |
Definition at line 645 of file RCLConsensus.h.
| std::optional<std::chrono::milliseconds> ripple::RCLConsensus::getTimerDelay | ( | ) | const |
Definition at line 651 of file RCLConsensus.h.
| void ripple::RCLConsensus::setTimerDelay | ( | std::optional< std::chrono::milliseconds > | td = std::nullopt | ) |
Definition at line 657 of file RCLConsensus.h.
|
staticconstexprprivate |
Warn for transactions that haven't been included every so many ledgers.
Definition at line 58 of file RCLConsensus.h.
|
private |
Definition at line 663 of file RCLConsensus.h.
Definition at line 664 of file RCLConsensus.h.
|
private |
Definition at line 665 of file RCLConsensus.h.
1.8.17