Bitcoin Core 32.99.0
P2P Digital Currency
Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
wallet::WalletDescriptor Class Reference

Descriptor with some wallet metadata. More...

#include <walletutil.h>

Collaboration diagram for wallet::WalletDescriptor:
[legend]

Public Member Functions

int32_t GetStart () const
 
int32_t GetNext () const
 
int32_t GetEnd () const
 
void IncNext ()
 Increments the next_index of the descriptor. More...
 
void DecNext ()
 Increments the next_index of the descriptor. More...
 
void SetEnd (int32_t end)
 Sets the range_end of the descriptor. More...
 
template<typename Stream >
void Serialize (Stream &s) const
 
 WalletDescriptor ()=delete
 
 WalletDescriptor (std::shared_ptr< Descriptor > descriptor, uint64_t creation_time, int32_t range_start, int32_t range_end, int32_t next_index)
 
void UpdateFrom (const WalletDescriptor &other)
 Replaces all metadata (range, start, end, creation time), and cache from another WalletDescriptor if it has the same canonical descriptor string. More...
 
bool IsCanonicallyEquivalent (const WalletDescriptor &other) const
 

Static Public Member Functions

template<typename Stream >
static WalletDescriptor FromStream (deserialize_type, Stream &s)
 

Public Attributes

const std::shared_ptr< const Descriptor > descriptor
 
uint64_t creation_time = 0
 
DescriptorCache cache
 

Private Member Functions

uint256 GetCanonicalHash () const
 

Private Attributes

int32_t range_start = 0
 
int32_t next_index = 0
 
int32_t range_end = 0
 
std::optional< uint256 > m_canonical_hash
 

Detailed Description

Descriptor with some wallet metadata.

Definition at line 63 of file walletutil.h.

Constructor & Destructor Documentation

◆ WalletDescriptor() [1/2]

wallet::WalletDescriptor::WalletDescriptor ( )
delete
Here is the caller graph for this function:

◆ WalletDescriptor() [2/2]

wallet::WalletDescriptor::WalletDescriptor ( std::shared_ptr< Descriptor >  descriptor,
uint64_t  creation_time,
int32_t  range_start,
int32_t  range_end,
int32_t  next_index 
)
inline

Definition at line 132 of file walletutil.h.

Member Function Documentation

◆ DecNext()

void wallet::WalletDescriptor::DecNext ( )
inline

Increments the next_index of the descriptor.

Definition at line 90 of file walletutil.h.

◆ FromStream()

template<typename Stream >
static WalletDescriptor wallet::WalletDescriptor::FromStream ( deserialize_type  ,
Stream &  s 
)
inlinestatic

Definition at line 112 of file walletutil.h.

Here is the call graph for this function:

◆ GetCanonicalHash()

uint256 wallet::WalletDescriptor::GetCanonicalHash ( ) const
private

Definition at line 100 of file walletutil.cpp.

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

◆ GetEnd()

int32_t wallet::WalletDescriptor::GetEnd ( ) const
inline

Definition at line 81 of file walletutil.h.

Here is the caller graph for this function:

◆ GetNext()

int32_t wallet::WalletDescriptor::GetNext ( ) const
inline

Definition at line 80 of file walletutil.h.

◆ GetStart()

int32_t wallet::WalletDescriptor::GetStart ( ) const
inline

Definition at line 79 of file walletutil.h.

Here is the caller graph for this function:

◆ IncNext()

void wallet::WalletDescriptor::IncNext ( )
inline

Increments the next_index of the descriptor.

Definition at line 84 of file walletutil.h.

◆ IsCanonicallyEquivalent()

bool wallet::WalletDescriptor::IsCanonicallyEquivalent ( const WalletDescriptor &  other) const

Definition at line 110 of file walletutil.cpp.

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

◆ Serialize()

template<typename Stream >
void wallet::WalletDescriptor::Serialize ( Stream &  s) const
inline

Definition at line 105 of file walletutil.h.

◆ SetEnd()

void wallet::WalletDescriptor::SetEnd ( int32_t  end)
inline

Sets the range_end of the descriptor.

Definition at line 96 of file walletutil.h.

◆ UpdateFrom()

void wallet::WalletDescriptor::UpdateFrom ( const WalletDescriptor &  other)

Replaces all metadata (range, start, end, creation time), and cache from another WalletDescriptor if it has the same canonical descriptor string.

The descriptor itself is not replaced to preserve existing serialization to maintain compatibility with previous software versions that expect specific serialization.

Definition at line 88 of file walletutil.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ cache

DescriptorCache wallet::WalletDescriptor::cache

Definition at line 77 of file walletutil.h.

◆ creation_time

uint64_t wallet::WalletDescriptor::creation_time = 0

Definition at line 76 of file walletutil.h.

◆ descriptor

const std::shared_ptr<const Descriptor> wallet::WalletDescriptor::descriptor

Definition at line 75 of file walletutil.h.

◆ m_canonical_hash

std::optional<uint256> wallet::WalletDescriptor::m_canonical_hash
mutableprivate

Definition at line 70 of file walletutil.h.

◆ next_index

int32_t wallet::WalletDescriptor::next_index = 0
private

Definition at line 67 of file walletutil.h.

◆ range_end

int32_t wallet::WalletDescriptor::range_end = 0
private

Definition at line 68 of file walletutil.h.

◆ range_start

int32_t wallet::WalletDescriptor::range_start = 0
private

Definition at line 66 of file walletutil.h.


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