Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
descriptor.cpp File Reference
#include <test/fuzz/util/descriptor.h>
#include <key.h>
#include <key_io.h>
#include <pubkey.h>
#include <span.h>
#include <util/strencodings.h>
#include <ranges>
#include <stack>
#include <vector>
Include dependency graph for descriptor.cpp:

Go to the source code of this file.

Functions

bool HasDeepDerivPath (std::span< const uint8_t > buff, const int max_depth)
 Whether the buffer, if it represents a valid descriptor, contains a derivation path deeper than a given maximum depth.
bool HasTooManySubFrag (std::span< const uint8_t > buff, const int max_subs, const size_t max_nested_subs)
 Whether the buffer, if it represents a valid descriptor, contains a fragment with more sub-fragments than the given maximum.
bool HasTooManyWrappers (std::span< const uint8_t > buff, const int max_wrappers)
 Whether the buffer, if it represents a valid descriptor, contains a fragment with more wrappers than the given maximum.
bool HasTooLargeLeafSize (std::span< const uint8_t > buff, const uint32_t max_leaf_size)
 Whether the expanded buffer (after calling GetDescriptor() in MockedDescriptorConverter) has a leaf size too large.

Function Documentation

◆ HasDeepDerivPath()

bool HasDeepDerivPath ( std::span< const uint8_t > buff,
int max_depth = MAX_DEPTH )

Whether the buffer, if it represents a valid descriptor, contains a derivation path deeper than a given maximum depth.

Note this may also be hit for deriv paths in origins.

Definition at line 85 of file descriptor.cpp.

Here is the caller graph for this function:

◆ HasTooLargeLeafSize()

bool HasTooLargeLeafSize ( std::span< const uint8_t > buff,
const uint32_t max_leaf_size )

Whether the expanded buffer (after calling GetDescriptor() in MockedDescriptorConverter) has a leaf size too large.

Definition at line 155 of file descriptor.cpp.

Here is the caller graph for this function:

◆ HasTooManySubFrag()

bool HasTooManySubFrag ( std::span< const uint8_t > buff,
const int max_subs,
const size_t max_nested_subs )

Whether the buffer, if it represents a valid descriptor, contains a fragment with more sub-fragments than the given maximum.

Definition at line 99 of file descriptor.cpp.

Here is the caller graph for this function:

◆ HasTooManyWrappers()

bool HasTooManyWrappers ( std::span< const uint8_t > buff,
const int max_wrappers )

Whether the buffer, if it represents a valid descriptor, contains a fragment with more wrappers than the given maximum.

Definition at line 123 of file descriptor.cpp.

Here is the caller graph for this function: