Bitcoin Core 32.1.0
P2P Digital Currency
Loading...
Searching...
No Matches
WalletDescriptor Class Reference

Descriptor with some wallet metadata. More...

#include <walletutil.h>

Collaboration diagram for 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.
void DecNext ()
 Increments the next_index of the descriptor.
void SetEnd (int32_t end)
 Sets the range_end of the descriptor.
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.
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]

◆ 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()

Increments the next_index of the descriptor.

Definition at line 90 of file walletutil.h.

◆ FromStream()

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

Definition at line 112 of file walletutil.h.

◆ GetCanonicalHash()

Definition at line 100 of file walletutil.cpp.

◆ GetEnd()

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

Definition at line 81 of file walletutil.h.

◆ 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.

◆ IncNext()

Increments the next_index of the descriptor.

Definition at line 84 of file walletutil.h.

◆ IsCanonicallyEquivalent()

Definition at line 110 of file walletutil.cpp.

◆ 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()

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.

Member Data Documentation

◆ cache

◆ creation_time

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

Definition at line 67 of file walletutil.h.

◆ range_end

Definition at line 68 of file walletutil.h.

◆ range_start

Definition at line 66 of file walletutil.h.


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