Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
CBlockHeaderAndShortTxIDs Class Reference

#include <blockencodings.h>

Collaboration diagram for CBlockHeaderAndShortTxIDs:
[legend]

Public Member Functions

 CBlockHeaderAndShortTxIDs ()=default
 Dummy for deserialization.
 CBlockHeaderAndShortTxIDs (const CBlock &block, uint64_t nonce)
uint64_t GetShortID (const Wtxid &wtxid) const
size_t BlockTxCount () const
 SERIALIZE_METHODS (CBlockHeaderAndShortTxIDs, obj)

Public Attributes

CBlockHeader header

Static Public Attributes

static constexpr int SHORTTXIDS_LENGTH = 6

Protected Attributes

std::vector< uint64_t > shorttxids
std::vector< PrefilledTransactionprefilledtxn

Private Member Functions

void FillShortTxIDSelector () const

Private Attributes

std::optional< PresaltedSipHasherm_hasher
uint64_t nonce

Friends

class PartiallyDownloadedBlock

Detailed Description

Definition at line 90 of file blockencodings.h.

Constructor & Destructor Documentation

◆ CBlockHeaderAndShortTxIDs() [1/2]

CBlockHeaderAndShortTxIDs::CBlockHeaderAndShortTxIDs ( )
default

Dummy for deserialization.

Here is the caller graph for this function:

◆ CBlockHeaderAndShortTxIDs() [2/2]

CBlockHeaderAndShortTxIDs::CBlockHeaderAndShortTxIDs ( const CBlock & block,
uint64_t nonce )
Parameters
[in]nonceThis should be randomly generated, and is used for the siphash secret key

Definition at line 20 of file blockencodings.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ BlockTxCount()

size_t CBlockHeaderAndShortTxIDs::BlockTxCount ( ) const
inline

Definition at line 119 of file blockencodings.h.

Here is the caller graph for this function:

◆ FillShortTxIDSelector()

void CBlockHeaderAndShortTxIDs::FillShortTxIDSelector ( ) const
private

Definition at line 35 of file blockencodings.cpp.

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

◆ GetShortID()

uint64_t CBlockHeaderAndShortTxIDs::GetShortID ( const Wtxid & wtxid) const

Definition at line 46 of file blockencodings.cpp.

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

◆ SERIALIZE_METHODS()

CBlockHeaderAndShortTxIDs::SERIALIZE_METHODS ( CBlockHeaderAndShortTxIDs ,
obj  )
inline

Definition at line 121 of file blockencodings.h.

Here is the call graph for this function:

◆ PartiallyDownloadedBlock

friend class PartiallyDownloadedBlock
friend

Definition at line 96 of file blockencodings.h.

Member Data Documentation

◆ header

CBlockHeader CBlockHeaderAndShortTxIDs::header

Definition at line 105 of file blockencodings.h.

◆ m_hasher

std::optional<PresaltedSipHasher> CBlockHeaderAndShortTxIDs::m_hasher
mutableprivate

Definition at line 91 of file blockencodings.h.

◆ nonce

uint64_t CBlockHeaderAndShortTxIDs::nonce
private

Definition at line 92 of file blockencodings.h.

◆ prefilledtxn

std::vector<PrefilledTransaction> CBlockHeaderAndShortTxIDs::prefilledtxn
protected

Definition at line 100 of file blockencodings.h.

◆ shorttxids

std::vector<uint64_t> CBlockHeaderAndShortTxIDs::shorttxids
protected

Definition at line 99 of file blockencodings.h.

◆ SHORTTXIDS_LENGTH

int CBlockHeaderAndShortTxIDs::SHORTTXIDS_LENGTH = 6
staticconstexpr

Definition at line 103 of file blockencodings.h.


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