Bitcoin ABC 0.30.5
P2P Digital Currency
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
avalanche::Proof Class Reference

#include <proof.h>

Collaboration diagram for avalanche::Proof:
[legend]

Public Member Functions

 Proof ()
 
 Proof (uint64_t sequence_, int64_t expirationTime_, CPubKey master_, std::vector< SignedStake > stakes_, const CScript &payoutScriptPubKey_, SchnorrSig signature_)
 
 Proof (Proof &&other)
 
template<typename Stream >
 Proof (deserialize_type, Stream &s)
 Deserialization constructor. More...
 
 SERIALIZE_METHODS (Proof, obj)
 
std::string ToHex () const
 
uint64_t getSequence () const
 
int64_t getExpirationTime () const
 
const CPubKeygetMaster () const
 
const std::vector< SignedStake > & getStakes () const
 
const CScriptgetPayoutScript () const
 
const SchnorrSiggetSignature () const
 
const ProofIdgetId () const
 
const LimitedProofIdgetLimitedId () const
 
const StakeCommitment getStakeCommitment () const
 
uint32_t getScore () const
 
Amount getStakedAmount () const
 
bool verify (const Amount &stakeUtxoDustThreshold, ProofValidationState &state) const
 
bool verify (const Amount &stakeUtxoDustThreshold, const ChainstateManager &chainman, ProofValidationState &state) const EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 

Static Public Member Functions

static bool FromHex (Proof &proof, const std::string &hexProof, bilingual_str &errorOut)
 
static uint32_t amountToScore (Amount amount)
 

Private Member Functions

void computeProofId ()
 
void computeScore ()
 
 IMPLEMENT_RCU_REFCOUNT (uint64_t)
 

Private Attributes

uint64_t sequence
 
int64_t expirationTime
 
CPubKey master
 
std::vector< SignedStakestakes
 
CScript payoutScriptPubKey
 
SchnorrSig signature
 
LimitedProofId limitedProofId
 
ProofId proofid
 
uint32_t score
 

Detailed Description

Definition at line 102 of file proof.h.

Constructor & Destructor Documentation

◆ Proof() [1/4]

avalanche::Proof::Proof ( )
inline

Definition at line 120 of file proof.h.

◆ Proof() [2/4]

avalanche::Proof::Proof ( uint64_t  sequence_,
int64_t  expirationTime_,
CPubKey  master_,
std::vector< SignedStake stakes_,
const CScript payoutScriptPubKey_,
SchnorrSig  signature_ 
)
inline

Definition at line 124 of file proof.h.

Here is the call graph for this function:

◆ Proof() [3/4]

avalanche::Proof::Proof ( Proof &&  other)
inline

Definition at line 134 of file proof.h.

◆ Proof() [4/4]

template<typename Stream >
avalanche::Proof::Proof ( deserialize_type  ,
Stream &  s 
)
inline

Deserialization constructor.

Definition at line 145 of file proof.h.

Here is the call graph for this function:

Member Function Documentation

◆ amountToScore()

uint32_t avalanche::Proof::amountToScore ( Amount  amount)
static

Definition at line 100 of file proof.cpp.

Here is the caller graph for this function:

◆ computeProofId()

void avalanche::Proof::computeProofId ( )
private

Definition at line 76 of file proof.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeScore()

void avalanche::Proof::computeScore ( )
private

Definition at line 91 of file proof.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FromHex()

bool avalanche::Proof::FromHex ( Proof proof,
const std::string &  hexProof,
bilingual_str errorOut 
)
static

Definition at line 51 of file proof.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getExpirationTime()

int64_t avalanche::Proof::getExpirationTime ( ) const
inline

Definition at line 163 of file proof.h.

Here is the caller graph for this function:

◆ getId()

const ProofId & avalanche::Proof::getId ( ) const
inline

Definition at line 169 of file proof.h.

Here is the caller graph for this function:

◆ getLimitedId()

const LimitedProofId & avalanche::Proof::getLimitedId ( ) const
inline

Definition at line 170 of file proof.h.

Here is the caller graph for this function:

◆ getMaster()

const CPubKey & avalanche::Proof::getMaster ( ) const
inline

Definition at line 164 of file proof.h.

Here is the caller graph for this function:

◆ getPayoutScript()

const CScript & avalanche::Proof::getPayoutScript ( ) const
inline

Definition at line 166 of file proof.h.

Here is the caller graph for this function:

◆ getScore()

uint32_t avalanche::Proof::getScore ( ) const
inline

Definition at line 174 of file proof.h.

Here is the caller graph for this function:

◆ getSequence()

uint64_t avalanche::Proof::getSequence ( ) const
inline

Definition at line 162 of file proof.h.

Here is the caller graph for this function:

◆ getSignature()

const SchnorrSig & avalanche::Proof::getSignature ( ) const
inline

Definition at line 167 of file proof.h.

Here is the caller graph for this function:

◆ getStakeCommitment()

const StakeCommitment avalanche::Proof::getStakeCommitment ( ) const
inline

Definition at line 171 of file proof.h.

Here is the caller graph for this function:

◆ getStakedAmount()

Amount avalanche::Proof::getStakedAmount ( ) const

Definition at line 104 of file proof.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getStakes()

const std::vector< SignedStake > & avalanche::Proof::getStakes ( ) const
inline

Definition at line 165 of file proof.h.

Here is the caller graph for this function:

◆ IMPLEMENT_RCU_REFCOUNT()

avalanche::Proof::IMPLEMENT_RCU_REFCOUNT ( uint64_t  )
private

◆ SERIALIZE_METHODS()

avalanche::Proof::SERIALIZE_METHODS ( Proof  ,
obj   
)
inline

Definition at line 149 of file proof.h.

◆ ToHex()

std::string avalanche::Proof::ToHex ( ) const

Definition at line 70 of file proof.cpp.

Here is the call graph for this function:

◆ verify() [1/2]

bool avalanche::Proof::verify ( const Amount stakeUtxoDustThreshold,
const ChainstateManager chainman,
ProofValidationState state 
) const

Definition at line 174 of file proof.cpp.

Here is the call graph for this function:

◆ verify() [2/2]

bool avalanche::Proof::verify ( const Amount stakeUtxoDustThreshold,
ProofValidationState state 
) const

Definition at line 119 of file proof.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ expirationTime

int64_t avalanche::Proof::expirationTime
private

Definition at line 104 of file proof.h.

◆ limitedProofId

LimitedProofId avalanche::Proof::limitedProofId
private

Definition at line 110 of file proof.h.

◆ master

CPubKey avalanche::Proof::master
private

Definition at line 105 of file proof.h.

◆ payoutScriptPubKey

CScript avalanche::Proof::payoutScriptPubKey
private

Definition at line 107 of file proof.h.

◆ proofid

ProofId avalanche::Proof::proofid
private

Definition at line 111 of file proof.h.

◆ score

uint32_t avalanche::Proof::score
private

Definition at line 114 of file proof.h.

◆ sequence

uint64_t avalanche::Proof::sequence
private

Definition at line 103 of file proof.h.

◆ signature

SchnorrSig avalanche::Proof::signature
private

Definition at line 108 of file proof.h.

◆ stakes

std::vector<SignedStake> avalanche::Proof::stakes
private

Definition at line 106 of file proof.h.


The documentation for this class was generated from the following files: