xrpld
Loading...
Searching...
No Matches
xrpl::RCLCxPeerPos Class Reference

A peer's signed, proposed position for use in RCLConsensus. More...

#include <RCLCxPeerPos.h>

Collaboration diagram for xrpl::RCLCxPeerPos:

Public Types

using Proposal = ConsensusProposal<NodeID, uint256, uint256>

Public Member Functions

 RCLCxPeerPos (PublicKey const &publicKey, Slice const &signature, uint256 const &suppress, Proposal const &proposal)
 Constructor.
bool checkSign () const
 Verify the signing hash of the proposal.
Slice signature () const
 Signature of the proposal (not necessarily verified).
PublicKey const & publicKey () const
 Public key of peer that sent the proposal.
uint256 const & suppressionID () const
 Unique id used by hash router to suppress duplicates.
Proposal const & proposal () const
json::Value getJson () const
 JSON representation of proposal.
std::string render () const

Private Member Functions

template<class Hasher>
void hash_append (Hasher &h) const

Private Attributes

PublicKey publicKey_
uint256 suppression_
Proposal proposal_
boost::container::static_vector< std::uint8_t, 72 > signature_

Detailed Description

A peer's signed, proposed position for use in RCLConsensus.

Carries a ConsensusProposal signed by a peer. Provides value semantics but manages shared storage of the peer position internally.

Definition at line 23 of file RCLCxPeerPos.h.

Member Typedef Documentation

◆ Proposal

Constructor & Destructor Documentation

◆ RCLCxPeerPos()

xrpl::RCLCxPeerPos::RCLCxPeerPos ( PublicKey const & publicKey,
Slice const & signature,
uint256 const & suppress,
Proposal const & proposal )

Constructor.

Constructs a signed peer position.

Parameters
publicKeyPublic key of the peer
signatureSignature provided with the proposal
suppressUnique id used for hash router suppression
proposalThe consensus proposal

Definition at line 18 of file RCLCxPeerPos.cpp.

Member Function Documentation

◆ checkSign()

bool xrpl::RCLCxPeerPos::checkSign ( ) const

Verify the signing hash of the proposal.

Definition at line 36 of file RCLCxPeerPos.cpp.

◆ signature()

Slice xrpl::RCLCxPeerPos::signature ( ) const

Signature of the proposal (not necessarily verified).

Definition at line 51 of file RCLCxPeerPos.h.

◆ publicKey()

PublicKey const & xrpl::RCLCxPeerPos::publicKey ( ) const

Public key of peer that sent the proposal.

Definition at line 58 of file RCLCxPeerPos.h.

◆ suppressionID()

uint256 const & xrpl::RCLCxPeerPos::suppressionID ( ) const

Unique id used by hash router to suppress duplicates.

Definition at line 65 of file RCLCxPeerPos.h.

◆ proposal()

Proposal const & xrpl::RCLCxPeerPos::proposal ( ) const

Definition at line 71 of file RCLCxPeerPos.h.

◆ getJson()

json::Value xrpl::RCLCxPeerPos::getJson ( ) const

JSON representation of proposal.

Definition at line 42 of file RCLCxPeerPos.cpp.

◆ render()

std::string xrpl::RCLCxPeerPos::render ( ) const

Definition at line 81 of file RCLCxPeerPos.h.

◆ hash_append()

template<class Hasher>
void xrpl::RCLCxPeerPos::hash_append ( Hasher & h) const
private

Definition at line 94 of file RCLCxPeerPos.h.

Member Data Documentation

◆ publicKey_

PublicKey xrpl::RCLCxPeerPos::publicKey_
private

Definition at line 87 of file RCLCxPeerPos.h.

◆ suppression_

uint256 xrpl::RCLCxPeerPos::suppression_
private

Definition at line 88 of file RCLCxPeerPos.h.

◆ proposal_

Proposal xrpl::RCLCxPeerPos::proposal_
private

Definition at line 89 of file RCLCxPeerPos.h.

◆ signature_

boost::container::static_vector<std::uint8_t, 72> xrpl::RCLCxPeerPos::signature_
private

Definition at line 90 of file RCLCxPeerPos.h.