3#include <xrpld/consensus/ConsensusProposal.h>
4#include <xrpld/consensus/DisputedTx.h>
6#include <xrpl/basics/chrono.h>
63 return "switchedLedger";
183template <
class Traits>
196 XRPL_ASSERT(
txns.id() ==
position.position(),
"xrpl::ConsensusResult : valid inputs");
Represents a proposed position taken during a round of consensus.
Measures the duration of phases of consensus.
std::chrono::milliseconds dur_
void reset(time_point tp)
void tick(std::chrono::milliseconds fixed)
std::chrono::steady_clock::time_point time_point
std::chrono::milliseconds read() const
A transaction discovered to be in dispute during consensus.
std::chrono::time_point< NetClock > time_point
T duration_cast(T... args)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
ConsensusMode
Represents how a node currently participates in Consensus.
@ WrongLedger
We have the wrong ledger and are attempting to acquire it.
@ Proposing
We are normal participant in consensus and propose our position.
@ Observing
We are observing peer positions, but not proposing our position.
@ Expired
List is expired, but has the largest non-pending sequence seen so far.
std::unordered_set< Value, Hash, Pred, Allocator > hash_set
static FunctionType fixed(Keylet const &keylet)
std::string to_string(BaseUInt< Bits, Tag > const &a)
ConsensusState
Whether we have or don't have a consensus.
@ MovedOn
The network has consensus without us.
@ No
We do not have consensus.
ConsensusPhase
Phases of consensus for a single ledger round.
@ Establish
Establishing consensus by exchanging proposals with our peers.
@ Open
We haven't closed our ledger yet, but others might have.
std::unordered_map< Key, Value, Hash, Pred, Allocator > hash_map
@ Accepted
Manifest is valid.
NetClock::time_point self
Our close time estimate.
ConsensusCloseTimes()=default
std::map< NetClock::time_point, int > peers
Close time estimates, keep ordered for predictable traverse.
ConsensusResult(TxSet_t &&s, Proposal_t &&p)
hash_map< typename Tx_t::ID, Dispute_t > disputes
ConsensusProposal< NodeID_t, typename Ledger_t::ID, typename TxSet_t::ID > Proposal_t
DisputedTx< Tx_t, NodeID_t > Dispute_t
hash_set< typename TxSet_t::ID > compares