rippled
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ripple::RCLCxPeerPos Class Reference

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

Collaboration diagram for ripple::RCLCxPeerPos:
Collaboration graph
[legend]

Classes

struct  Data
 

Public Types

using Proposal = ConsensusProposal< NodeID, uint256, uint256 >
 

Public Member Functions

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

Private Member Functions

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

Private Attributes

std::shared_ptr< Datadata_
 

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 42 of file RCLCxPeerPos.h.

Member Typedef Documentation

◆ Proposal

Definition at line 46 of file RCLCxPeerPos.h.

Constructor & Destructor Documentation

◆ RCLCxPeerPos()

ripple::RCLCxPeerPos::RCLCxPeerPos ( PublicKey const &  publicKey,
Slice const &  signature,
uint256 const &  suppress,
Proposal &&  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 30 of file RCLCxPeerPos.cpp.

Member Function Documentation

◆ signingHash()

uint256 ripple::RCLCxPeerPos::signingHash ( ) const

Create the signing hash for the proposal.

Definition at line 44 of file RCLCxPeerPos.cpp.

◆ checkSign()

bool ripple::RCLCxPeerPos::checkSign ( ) const

Verify the signing hash of the proposal.

Definition at line 55 of file RCLCxPeerPos.cpp.

◆ signature()

Slice ripple::RCLCxPeerPos::signature ( ) const

Signature of the proposal (not necessarily verified)

Definition at line 74 of file RCLCxPeerPos.h.

◆ publicKey()

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

Public key of peer that sent the proposal.

Definition at line 81 of file RCLCxPeerPos.h.

◆ suppressionID()

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

Unique id used by hash router to suppress duplicates.

Definition at line 88 of file RCLCxPeerPos.h.

◆ proposal()

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

Definition at line 94 of file RCLCxPeerPos.h.

◆ getJson()

Json::Value ripple::RCLCxPeerPos::getJson ( ) const

JSON representation of proposal.

Definition at line 61 of file RCLCxPeerPos.cpp.

◆ hash_append()

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

Definition at line 122 of file RCLCxPeerPos.h.

Member Data Documentation

◆ data_

std::shared_ptr<Data> ripple::RCLCxPeerPos::data_
private

Definition at line 118 of file RCLCxPeerPos.h.