19 #ifndef RIPPLE_CONSENSUS_CONSENSUSPROPOSAL_H_INCLUDED 
   20 #define RIPPLE_CONSENSUS_CONSENSUSPROPOSAL_H_INCLUDED 
   22 #include <ripple/basics/base_uint.h> 
   23 #include <ripple/basics/chrono.h> 
   24 #include <ripple/json/json_value.h> 
   25 #include <ripple/protocol/HashPrefix.h> 
   26 #include <ripple/protocol/jss.h> 
   54 template <
class NodeID_t, 
class LedgerID_t, 
class Position_t>
 
  159         return time_ <= cutoff;
 
  171         Position_t 
const& newPosition,
 
  212         ret[jss::close_time] =
 
  258 template <
class NodeID_t, 
class LedgerID_t, 
class Position_t>
 
  
NetClock::time_point time_
 
std::uint32_t proposeSeq() const
Get the sequence number of this proposal.
 
bool isStale(NetClock::time_point cutoff) const
Get whether this position is stale relative to the provided cutoff.
 
NetClock::time_point closeTime_
The ledger close time this position is taking.
 
Json::Value getJson() const
Get JSON representation for debugging.
 
NodeID_t nodeID_
The identifier of the node taking this position.
 
static const std::uint32_t seqLeave
 
void bowOut(NetClock::time_point now)
Leave consensus.
 
void changePosition(Position_t const &newPosition, NetClock::time_point newCloseTime, NetClock::time_point now)
Update the position during the consensus process.
 
bool operator==(Manifest const &lhs, Manifest const &rhs)
 
LedgerID_t const  & prevLedger() const
Get the prior accepted ledger this position is based on.
 
ConsensusProposal(LedgerID_t const &prevLedger, std::uint32_t seq, Position_t const &position, NetClock::time_point closeTime, NetClock::time_point now, NodeID_t const &nodeID)
Constructor.
 
@ objectValue
object value (collection of name/value pairs).
 
@ proposal
proposal for signing
 
std::uint32_t proposeSeq_
The sequence number of these positions taken by this node.
 
LedgerID_t previousLedger_
Unique identifier of prior ledger this proposal is based on.
 
std::optional< uint256 > signingHash_
The signing hash for this proposal.
 
NodeID_t const  & nodeID() const
Identifying which peer took this position.
 
NetClock::time_point const  & closeTime() const
The current position on the consensus close time.
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
sha512_half_hasher::result_type sha512Half(Args const &... args)
Returns the SHA512-Half of a series of objects.
 
bool isBowOut() const
Get whether this node left the consensus process.
 
static const std::uint32_t seqJoin
 
NetClock::time_point const  & seenTime() const
Get when this position was taken.
 
uint256 const  & signingHash() const
The digest for this proposal, used for signing purposes.
 
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.
 
Position_t position_
Unique identifier of the position this proposal is taking.
 
Position_t const  & position() const
Get the proposed position.
 
bool isInitial() const
Whether this is the first position taken during the current consensus round.
 
Represents a proposed position taken during a round of consensus.