Bitcoin Core 32.99.0
P2P Digital Currency
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
wallet::FuzzedWallet Struct Reference

Wraps a descriptor wallet for fuzzing. More...

#include <wallet.h>

Collaboration diagram for wallet::FuzzedWallet:
[legend]

Public Member Functions

 FuzzedWallet (interfaces::Chain &chain, const std::string &name, const std::string &seed_insecure)
 
void Reset ()
 
CTxDestination GetDestination (FuzzedDataProvider &fuzzed_data_provider)
 
CScript GetScriptPubKey (FuzzedDataProvider &fuzzed_data_provider)
 
int64_t RangeTotal () const
 

Public Attributes

std::shared_ptr< CWallet > wallet
 

Static Public Attributes

static constexpr size_t DESTINATION_POOL_SIZE {16}
 
static constexpr uint64_t REBUILD_INTERVAL {1000}
 

Private Types

using DestinationPool = std::array< std::vector< CTxDestination >, OUTPUT_TYPES.size()>
 
using PoolCursors = std::array< size_t, OUTPUT_TYPES.size()>
 

Private Member Functions

void Build ()
 
void ImportDescriptors (const std::string &seed_insecure)
 
void PrecomputeDestinations ()
 

Static Private Member Functions

static size_t TypeIndex (OutputType type)
 

Private Attributes

interfaces::Chain & m_chain
 
const std::string m_name
 
const std::string m_seed_insecure
 
DestinationPool m_dests
 
DestinationPool m_change_dests
 
PoolCursors m_cursors {}
 
PoolCursors m_change_cursors {}
 
std::vector< DescriptorScriptPubKeyMan * > m_spkms
 
uint64_t m_iterations {0}
 

Detailed Description

Wraps a descriptor wallet for fuzzing.

Definition at line 33 of file wallet.h.

Member Typedef Documentation

◆ DestinationPool

using wallet::FuzzedWallet::DestinationPool = std::array<std::vector<CTxDestination>, OUTPUT_TYPES.size()>
private

Definition at line 83 of file wallet.h.

◆ PoolCursors

using wallet::FuzzedWallet::PoolCursors = std::array<size_t, OUTPUT_TYPES.size()>
private

Definition at line 89 of file wallet.h.

Constructor & Destructor Documentation

◆ FuzzedWallet()

wallet::FuzzedWallet::FuzzedWallet ( interfaces::Chain &  chain,
const std::string &  name,
const std::string &  seed_insecure 
)
inline

Definition at line 39 of file wallet.h.

Here is the call graph for this function:

Member Function Documentation

◆ Build()

void wallet::FuzzedWallet::Build ( )
inlineprivate

Definition at line 107 of file wallet.h.

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

◆ GetDestination()

CTxDestination wallet::FuzzedWallet::GetDestination ( FuzzedDataProvider &  fuzzed_data_provider)
inline

Definition at line 61 of file wallet.h.

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

◆ GetScriptPubKey()

CScript wallet::FuzzedWallet::GetScriptPubKey ( FuzzedDataProvider &  fuzzed_data_provider)
inline

Definition at line 73 of file wallet.h.

Here is the call graph for this function:

◆ ImportDescriptors()

void wallet::FuzzedWallet::ImportDescriptors ( const std::string &  seed_insecure)
inlineprivate

Definition at line 130 of file wallet.h.

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

◆ PrecomputeDestinations()

void wallet::FuzzedWallet::PrecomputeDestinations ( )
inlineprivate

Definition at line 161 of file wallet.h.

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

◆ RangeTotal()

int64_t wallet::FuzzedWallet::RangeTotal ( ) const
inline

Definition at line 75 of file wallet.h.

Here is the call graph for this function:

◆ Reset()

void wallet::FuzzedWallet::Reset ( )
inline

Definition at line 45 of file wallet.h.

Here is the call graph for this function:

◆ TypeIndex()

static size_t wallet::FuzzedWallet::TypeIndex ( OutputType  type)
inlinestaticprivate

Definition at line 96 of file wallet.h.

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

Member Data Documentation

◆ DESTINATION_POOL_SIZE

constexpr size_t wallet::FuzzedWallet::DESTINATION_POOL_SIZE {16}
staticconstexpr

Definition at line 34 of file wallet.h.

◆ m_chain

interfaces::Chain& wallet::FuzzedWallet::m_chain
private

Definition at line 85 of file wallet.h.

◆ m_change_cursors

PoolCursors wallet::FuzzedWallet::m_change_cursors {}
private

Definition at line 94 of file wallet.h.

◆ m_change_dests

DestinationPool wallet::FuzzedWallet::m_change_dests
private

Definition at line 92 of file wallet.h.

◆ m_cursors

PoolCursors wallet::FuzzedWallet::m_cursors {}
private

Definition at line 93 of file wallet.h.

◆ m_dests

DestinationPool wallet::FuzzedWallet::m_dests
private

Definition at line 91 of file wallet.h.

◆ m_iterations

uint64_t wallet::FuzzedWallet::m_iterations {0}
private

Definition at line 105 of file wallet.h.

◆ m_name

const std::string wallet::FuzzedWallet::m_name
private

Definition at line 86 of file wallet.h.

◆ m_seed_insecure

const std::string wallet::FuzzedWallet::m_seed_insecure
private

Definition at line 87 of file wallet.h.

◆ m_spkms

std::vector<DescriptorScriptPubKeyMan*> wallet::FuzzedWallet::m_spkms
private

Definition at line 104 of file wallet.h.

◆ REBUILD_INTERVAL

constexpr uint64_t wallet::FuzzedWallet::REBUILD_INTERVAL {1000}
staticconstexpr

Definition at line 35 of file wallet.h.

◆ wallet

std::shared_ptr<CWallet> wallet::FuzzedWallet::wallet

Definition at line 37 of file wallet.h.


The documentation for this struct was generated from the following file: