| 
    rippled
    
   | 
 

Public Types | |
| using | Ledger_t = RCLCxLedger | 
| using | NodeID_t = NodeID | 
| using | NodeKey_t = PublicKey | 
| using | TxSet_t = RCLTxSet | 
| using | PeerPosition_t = RCLCxPeerPos | 
| using | Result = ConsensusResult< Adaptor > | 
Public Member Functions | |
| Adaptor (Application &app, std::unique_ptr< FeeVote > &&feeVote, LedgerMaster &ledgerMaster, LocalTxs &localTxs, InboundTransactions &inboundTransactions, ValidatorKeys const &validatorKeys, beast::Journal journal) | |
| bool | validating () const | 
| std::size_t | prevProposers () const | 
| std::chrono::milliseconds | prevRoundTime () const | 
| ConsensusMode | mode () const | 
| bool | preStartRound (RCLCxLedger const &prevLedger, hash_set< NodeID > const &nowTrusted) | 
| Called before kicking off a new consensus round.   | |
| bool | haveValidated () const | 
| LedgerIndex | getValidLedgerIndex () const | 
| std::pair< std::size_t, hash_set< NodeKey_t > > | getQuorumKeys () const | 
| std::size_t | laggards (Ledger_t::Seq const seq, hash_set< NodeKey_t > &trustedKeys) const | 
| bool | validator () const | 
| Whether I am a validator.   | |
| void | updateOperatingMode (std::size_t const positions) const | 
| Update operating mode based on current peer positions.   | |
| ConsensusParms const & | parms () const | 
| Consensus simulation parameters.   | |
Private Member Functions | |
| std::optional< RCLCxLedger > | acquireLedger (LedgerHash const &hash) | 
| Attempt to acquire a specific ledger.   | |
| void | share (RCLCxPeerPos const &peerPos) | 
| Share the given proposal with all peers.   | |
| void | share (RCLCxTx const &tx) | 
| Share disputed transaction to peers.   | |
| std::optional< RCLTxSet > | acquireTxSet (RCLTxSet::ID const &setId) | 
| Acquire the transaction set associated with a proposal.   | |
| bool | hasOpenTransactions () const | 
| Whether the open ledger has any transactions.   | |
| std::size_t | proposersValidated (LedgerHash const &h) const | 
| Number of proposers that have validated the given ledger.   | |
| std::size_t | proposersFinished (RCLCxLedger const &ledger, LedgerHash const &h) const | 
| Number of proposers that have validated a ledger descended from requested ledger.   | |
| void | propose (RCLCxPeerPos::Proposal const &proposal) | 
| Propose the given position to my peers.   | |
| void | share (RCLTxSet const &txns) | 
| Share the given tx set to peers.   | |
| uint256 | getPrevLedger (uint256 ledgerID, RCLCxLedger const &ledger, ConsensusMode mode) | 
| Get the ID of the previous ledger/last closed ledger(LCL) on the network.   | |
| void | onModeChange (ConsensusMode before, ConsensusMode after) | 
| Notified of change in consensus mode.   | |
| Result | onClose (RCLCxLedger const &ledger, NetClock::time_point const &closeTime, ConsensusMode mode) | 
| Close the open ledger and return initial consensus position.   | |
| void | onAccept (Result const &result, RCLCxLedger const &prevLedger, NetClock::duration const &closeResolution, ConsensusCloseTimes const &rawCloseTimes, ConsensusMode const &mode, Json::Value &&consensusJson, bool const validating) | 
| Process the accepted ledger.   | |
| void | onForceAccept (Result const &result, RCLCxLedger const &prevLedger, NetClock::duration const &closeResolution, ConsensusCloseTimes const &rawCloseTimes, ConsensusMode const &mode, Json::Value &&consensusJson) | 
| Process the accepted ledger that was a result of simulation/force accept.   | |
| void | notify (protocol::NodeEvent ne, RCLCxLedger const &ledger, bool haveCorrectLCL) | 
| Notify peers of a consensus state change.   | |
| void | doAccept (Result const &result, RCLCxLedger const &prevLedger, NetClock::duration closeResolution, ConsensusCloseTimes const &rawCloseTimes, ConsensusMode const &mode, Json::Value &&consensusJson) | 
| Accept a new ledger based on the given transactions.   | |
| RCLCxLedger | buildLCL (RCLCxLedger const &previousLedger, CanonicalTXSet &retriableTxs, NetClock::time_point closeTime, bool closeTimeCorrect, NetClock::duration closeResolution, std::chrono::milliseconds roundTime, std::set< TxID > &failedTxs) | 
| Build the new last closed ledger.   | |
| void | validate (RCLCxLedger const &ledger, RCLTxSet const &txns, bool proposing) | 
| Validate the given ledger and share with peers as necessary.   | |
Friends | |
| class | Consensus< Adaptor > | 
Definition at line 40 of file RCLConsensus.h.
Definition at line 74 of file RCLConsensus.h.
Definition at line 75 of file RCLConsensus.h.
Definition at line 76 of file RCLConsensus.h.
Definition at line 77 of file RCLConsensus.h.
Definition at line 78 of file RCLConsensus.h.
Definition at line 80 of file RCLConsensus.h.
| ripple::RCLConsensus::Adaptor::Adaptor | ( | Application & | app, | 
| std::unique_ptr< FeeVote > && | feeVote, | ||
| LedgerMaster & | ledgerMaster, | ||
| LocalTxs & | localTxs, | ||
| InboundTransactions & | inboundTransactions, | ||
| ValidatorKeys const & | validatorKeys, | ||
| beast::Journal | journal | ||
| ) | 
Definition at line 57 of file RCLConsensus.cpp.
| bool ripple::RCLConsensus::Adaptor::validating | ( | ) | const | 
Definition at line 92 of file RCLConsensus.h.
| std::size_t ripple::RCLConsensus::Adaptor::prevProposers | ( | ) | const | 
Definition at line 98 of file RCLConsensus.h.
| std::chrono::milliseconds ripple::RCLConsensus::Adaptor::prevRoundTime | ( | ) | const | 
Definition at line 104 of file RCLConsensus.h.
| ConsensusMode ripple::RCLConsensus::Adaptor::mode | ( | ) | const | 
Definition at line 110 of file RCLConsensus.h.
| bool ripple::RCLConsensus::Adaptor::preStartRound | ( | RCLCxLedger const & | prevLedger, | 
| hash_set< NodeID > const & | nowTrusted | ||
| ) | 
Called before kicking off a new consensus round.
| prevLedger | Ledger that will be prior ledger for next round | 
| nowTrusted | the new validators | 
Definition at line 980 of file RCLConsensus.cpp.
| bool ripple::RCLConsensus::Adaptor::haveValidated | ( | ) | const | 
Definition at line 1031 of file RCLConsensus.cpp.
| LedgerIndex ripple::RCLConsensus::Adaptor::getValidLedgerIndex | ( | ) | const | 
Definition at line 1037 of file RCLConsensus.cpp.
| std::pair< std::size_t, hash_set< RCLConsensus::Adaptor::NodeKey_t > > ripple::RCLConsensus::Adaptor::getQuorumKeys | ( | ) | const | 
Definition at line 1043 of file RCLConsensus.cpp.
| std::size_t ripple::RCLConsensus::Adaptor::laggards | ( | Ledger_t::Seq const | seq, | 
| hash_set< NodeKey_t > & | trustedKeys | ||
| ) | const | 
Definition at line 1049 of file RCLConsensus.cpp.
| bool ripple::RCLConsensus::Adaptor::validator | ( | ) | const | 
Whether I am a validator.
Definition at line 1057 of file RCLConsensus.cpp.
| void ripple::RCLConsensus::Adaptor::updateOperatingMode | ( | std::size_t const | positions | ) | const | 
Update operating mode based on current peer positions.
If our current ledger has no agreement from the network, then we cannot be in the omFULL mode.
| positions | Number of current peer positions. | 
Definition at line 1063 of file RCLConsensus.cpp.
| ConsensusParms const & ripple::RCLConsensus::Adaptor::parms | ( | ) | const | 
Consensus simulation parameters.
Definition at line 159 of file RCLConsensus.h.
      
  | 
  private | 
Attempt to acquire a specific ledger.
If not available, asynchronously acquires from the network.
| hash | The ID/hash of the ledger acquire | 
Definition at line 107 of file RCLConsensus.cpp.
      
  | 
  private | 
Share the given proposal with all peers.
| peerPos | The peer position to share. | 
Definition at line 148 of file RCLConsensus.cpp.
      
  | 
  private | 
Share disputed transaction to peers.
Only share if the provided transaction hasn't been shared recently.
| tx | The disputed transaction to share. | 
Definition at line 172 of file RCLConsensus.cpp.
      
  | 
  private | 
Acquire the transaction set associated with a proposal.
If the transaction set is not available locally, will attempt acquire it from the network.
| setId | The transaction set ID associated with the proposal | 
Definition at line 244 of file RCLConsensus.cpp.
      
  | 
  private | 
Whether the open ledger has any transactions.
Definition at line 254 of file RCLConsensus.cpp.
      
  | 
  private | 
Number of proposers that have validated the given ledger.
| h | The hash of the ledger of interest | 
Definition at line 260 of file RCLConsensus.cpp.
      
  | 
  private | 
Number of proposers that have validated a ledger descended from requested ledger.
| ledger | The current working ledger | 
| h | The hash of the preferred working ledger | 
Definition at line 266 of file RCLConsensus.cpp.
      
  | 
  private | 
Propose the given position to my peers.
| proposal | Our proposed position | 
Definition at line 193 of file RCLConsensus.cpp.
      
  | 
  private | 
Share the given tx set to peers.
| txns | The TxSet to share. | 
Definition at line 238 of file RCLConsensus.cpp.
      
  | 
  private | 
Get the ID of the previous ledger/last closed ledger(LCL) on the network.
| ledgerID | ID of previous ledger used by consensus | 
| ledger | Previous ledger consensus has available | 
| mode | Current consensus mode | 
Definition at line 276 of file RCLConsensus.cpp.
      
  | 
  private | 
Notified of change in consensus mode.
| before | The prior consensus mode | 
| after | The new consensus mode | 
Definition at line 895 of file RCLConsensus.cpp.
      
  | 
  private | 
Close the open ledger and return initial consensus position.
| ledger | the ledger we are changing to | 
| closeTime | When consensus closed the ledger | 
| mode | Current consensus mode | 
Definition at line 298 of file RCLConsensus.cpp.
      
  | 
  private | 
Process the accepted ledger.
| result | The result of consensus | 
| prevLedger | The closed ledger consensus worked from | 
| closeResolution | The resolution used in agreeing on an effective closeTime | 
| rawCloseTimes | The unrounded closetimes of ourself and our peers | 
| mode | Our participating mode at the time consensus was declared | 
| consensusJson | Json representation of consensus state | 
| validating | whether this is a validator | 
Definition at line 414 of file RCLConsensus.cpp.
      
  | 
  private | 
Process the accepted ledger that was a result of simulation/force accept.
Definition at line 396 of file RCLConsensus.cpp.
      
  | 
  private | 
Notify peers of a consensus state change.
| ne | Event type for notification | 
| ledger | The ledger at the time of the state change | 
| haveCorrectLCL | Whether we believe we have the correct LCL. | 
Definition at line 717 of file RCLConsensus.cpp.
      
  | 
  private | 
Accept a new ledger based on the given transactions.
Definition at line 445 of file RCLConsensus.cpp.
      
  | 
  private | 
Build the new last closed ledger.
Accept the given the provided set of consensus transactions and build the last closed ledger. Since consensus just agrees on which transactions to apply, but not whether they make it into the closed ledger, this function also populates retriableTxs with those that can be retried in the next round.
| previousLedger | Prior ledger building upon | 
| retriableTxs | On entry, the set of transactions to apply to the ledger; on return, the set of transactions to retry in the next round. | 
| closeTime | The time the ledger closed | 
| closeTimeCorrect | Whether consensus agreed on close time | 
| closeResolution | Resolution used to determine consensus close time | 
| roundTime | Duration of this consensus round | 
| failedTxs | Populate with transactions that we could not successfully apply. | 
Definition at line 756 of file RCLConsensus.cpp.
      
  | 
  private | 
Validate the given ledger and share with peers as necessary.
| ledger | The ledger to validate | 
| txns | The consensus transaction set | 
| proposing | Whether we were proposing transactions while generating this ledger. If we are not proposing, a validation can still be sent to inform peers that we know we aren't fully participating in consensus but are still around and trying to catch up. | 
Definition at line 799 of file RCLConsensus.cpp.
Definition at line 159 of file RCLConsensus.h.
      
  | 
  private | 
Definition at line 42 of file RCLConsensus.h.
      
  | 
  private | 
Definition at line 43 of file RCLConsensus.h.
      
  | 
  private | 
Definition at line 44 of file RCLConsensus.h.
      
  | 
  private | 
Definition at line 45 of file RCLConsensus.h.
      
  | 
  private | 
Definition at line 46 of file RCLConsensus.h.
      
  | 
  private | 
Definition at line 47 of file RCLConsensus.h.
      
  | 
  private | 
Definition at line 50 of file RCLConsensus.h.
      
  | 
  private | 
Definition at line 53 of file RCLConsensus.h.
      
  | 
  private | 
Definition at line 56 of file RCLConsensus.h.
      
  | 
  private | 
Definition at line 57 of file RCLConsensus.h.
      
  | 
  private | 
Definition at line 60 of file RCLConsensus.h.
      
  | 
  private | 
Definition at line 64 of file RCLConsensus.h.
      
  | 
  private | 
Definition at line 65 of file RCLConsensus.h.
      
  | 
  private | 
Definition at line 66 of file RCLConsensus.h.
      
  | 
  private | 
Definition at line 68 of file RCLConsensus.h.
      
  | 
  private | 
Definition at line 70 of file RCLConsensus.h.
      
  | 
  private | 
Definition at line 71 of file RCLConsensus.h.