Bitcoin Core  25.99.0
P2P Digital Currency
Classes | Functions | Variables
descriptor_parse.cpp File Reference
#include <chainparams.h>
#include <key_io.h>
#include <pubkey.h>
#include <script/descriptor.h>
#include <test/fuzz/fuzz.h>
#include <util/chaintype.h>
#include <util/strencodings.h>
Include dependency graph for descriptor_parse.cpp:

Go to the source code of this file.

Classes

class  MockedDescriptorConverter
 Converts a mocked descriptor string to a valid one. More...
 

Functions

static void TestDescriptor (const Descriptor &desc, FlatSigningProvider &sig_provider, std::string &dummy)
 Test a successfully parsed descriptor. More...
 
void initialize_descriptor_parse ()
 
void initialize_mocked_descriptor_parse ()
 
 FUZZ_TARGET (mocked_descriptor_parse,.init=initialize_mocked_descriptor_parse)
 
 FUZZ_TARGET (descriptor_parse,.init=initialize_descriptor_parse)
 

Variables

static constexpr uint8_t KEY_TYPES_COUNT {6}
 Types are raw (un)compressed pubkeys, raw xonly pubkeys, raw privkeys (WIF), xpubs, xprvs. More...
 
static constexpr size_t TOTAL_KEYS_GENERATED {std::numeric_limits<uint8_t>::max() + 1}
 How many keys we'll generate in total. More...
 
MockedDescriptorConverter MOCKED_DESC_CONVERTER
 The converter of mocked descriptors, needs to be initialized when the target is. More...
 

Function Documentation

◆ FUZZ_TARGET() [1/2]

FUZZ_TARGET ( descriptor_parse  ,
init = initialize_descriptor_parse 
)

Definition at line 173 of file descriptor_parse.cpp.

Here is the call graph for this function:

◆ FUZZ_TARGET() [2/2]

FUZZ_TARGET ( mocked_descriptor_parse  ,
init = initialize_mocked_descriptor_parse 
)

Definition at line 162 of file descriptor_parse.cpp.

Here is the call graph for this function:

◆ initialize_descriptor_parse()

void initialize_descriptor_parse ( )

Definition at line 150 of file descriptor_parse.cpp.

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

◆ initialize_mocked_descriptor_parse()

void initialize_mocked_descriptor_parse ( )

Definition at line 156 of file descriptor_parse.cpp.

Here is the call graph for this function:

◆ TestDescriptor()

static void TestDescriptor ( const Descriptor desc,
FlatSigningProvider sig_provider,
std::string &  dummy 
)
static

Test a successfully parsed descriptor.

Definition at line 112 of file descriptor_parse.cpp.

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

Variable Documentation

◆ KEY_TYPES_COUNT

constexpr uint8_t KEY_TYPES_COUNT {6}
staticconstexpr

Types are raw (un)compressed pubkeys, raw xonly pubkeys, raw privkeys (WIF), xpubs, xprvs.

Definition at line 14 of file descriptor_parse.cpp.

◆ MOCKED_DESC_CONVERTER

MockedDescriptorConverter MOCKED_DESC_CONVERTER

The converter of mocked descriptors, needs to be initialized when the target is.

Definition at line 109 of file descriptor_parse.cpp.

◆ TOTAL_KEYS_GENERATED

constexpr size_t TOTAL_KEYS_GENERATED {std::numeric_limits<uint8_t>::max() + 1}
staticconstexpr

How many keys we'll generate in total.

Definition at line 16 of file descriptor_parse.cpp.