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

#include <proofbuilder.h>

Collaboration diagram for avalanche::ProofBuilder:
[legend]

Classes

struct  StakeSigner
 

Public Member Functions

 ProofBuilder (uint64_t sequence_, int64_t expirationTime_, CPubKey master_)
 
bool addUTXO (COutPoint utxo, Amount amount, uint32_t height, bool is_coinbase, CKey key)
 
Proof build ()
 

Static Public Member Functions

static Proof buildRandom (uint32_t score)
 Builds a randomized (and therefore invalid) Proof. More...
 

Private Member Functions

ProofId getProofId () const
 

Private Attributes

uint64_t sequence
 
int64_t expirationTime
 
CPubKey master
 
std::vector< StakeSignerstakes
 

Detailed Description

Definition at line 15 of file proofbuilder.h.

Constructor & Destructor Documentation

◆ ProofBuilder()

avalanche::ProofBuilder::ProofBuilder ( uint64_t  sequence_,
int64_t  expirationTime_,
CPubKey  master_ 
)
inline

Definition at line 33 of file proofbuilder.h.

Here is the call graph for this function:

Member Function Documentation

◆ addUTXO()

bool avalanche::ProofBuilder::addUTXO ( COutPoint  utxo,
Amount  amount,
uint32_t  height,
bool  is_coinbase,
CKey  key 
)

Definition at line 22 of file proofbuilder.cpp.

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

◆ build()

Proof avalanche::ProofBuilder::build ( )

Definition at line 34 of file proofbuilder.cpp.

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

◆ buildRandom()

Proof avalanche::ProofBuilder::buildRandom ( uint32_t  score)
static

Builds a randomized (and therefore invalid) Proof.

Useful for tests.

Definition at line 63 of file proofbuilder.cpp.

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

◆ getProofId()

ProofId avalanche::ProofBuilder::getProofId ( ) const
private

Definition at line 49 of file proofbuilder.cpp.

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

Member Data Documentation

◆ expirationTime

int64_t avalanche::ProofBuilder::expirationTime
private

Definition at line 17 of file proofbuilder.h.

◆ master

CPubKey avalanche::ProofBuilder::master
private

Definition at line 18 of file proofbuilder.h.

◆ sequence

uint64_t avalanche::ProofBuilder::sequence
private

Definition at line 16 of file proofbuilder.h.

◆ stakes

std::vector<StakeSigner> avalanche::ProofBuilder::stakes
private

Definition at line 30 of file proofbuilder.h.


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