20 #ifndef RIPPLE_APP_CONSENSUS_RCLCXPEERPOS_H_INCLUDED
21 #define RIPPLE_APP_CONSENSUS_RCLCXPEERPOS_H_INCLUDED
23 #include <ripple/basics/CountedObject.h>
24 #include <ripple/basics/base_uint.h>
25 #include <ripple/beast/hash/hash_append.h>
26 #include <ripple/consensus/ConsensusProposal.h>
27 #include <ripple/json/json_value.h>
28 #include <ripple/protocol/HashPrefix.h>
29 #include <ripple/protocol/PublicKey.h>
30 #include <ripple/protocol/SecretKey.h>
76 return data_->signature_;
83 return data_->publicKey_;
90 return data_->suppression_;
96 return data_->proposal_;
120 template <
class Hasher>
155 Slice
const& publicKey,
156 Slice
const& signature);
A peer's signed, proposed position for use in RCLConsensus.
Tracks the number of instances of an object.
Slice signature() const
Signature of the proposal (not necessarily verified)
An immutable linear range of bytes.
Like std::vector<char> but better.
Proposal const & proposal() const
ConsensusProposal< NodeID, uint256, uint256 > Proposal
uint256 signingHash() const
Create the signing hash for the proposal.
@ proposal
proposal for signing
uint256 proposalUniqueId(uint256 const &proposeHash, uint256 const &previousLedger, std::uint32_t proposeSeq, NetClock::time_point closeTime, Slice const &publicKey, Slice const &signature)
Calculate a unique identifier for a signed proposal.
std::shared_ptr< Data > data_
PublicKey const & publicKey() const
Public key of peer that sent the proposal.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Json::Value getJson() const
JSON representation of proposal.
std::enable_if_t< is_contiguously_hashable< T, Hasher >::value > hash_append(Hasher &h, T const &t) noexcept
Logically concatenate input data to a Hasher.
RCLCxPeerPos(PublicKey const &publicKey, Slice const &signature, uint256 const &suppress, Proposal &&proposal)
Constructor.
uint256 const & suppressionID() const
Unique id used by hash router to suppress duplicates.
void hash_append(Hasher &h) const
Data(PublicKey const &publicKey, Slice const &signature, uint256 const &suppress, Proposal &&proposal)
std::chrono::time_point< NetClock > time_point
bool checkSign() const
Verify the signing hash of the proposal.