Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
util.cpp File Reference
#include <consensus/amount.h>
#include <pubkey.h>
#include <test/fuzz/util.h>
#include <test/util/script.h>
#include <util/check.h>
#include <util/overflow.h>
#include <util/rbf.h>
#include <util/time.h>
#include <memory>
Include dependency graph for util.cpp:

Go to the source code of this file.

Functions

std::vector< uint8_t > ConstructPubKeyBytes (FuzzedDataProvider &fuzzed_data_provider, std::span< const uint8_t > byte_data, const bool compressed) noexcept
CAmount ConsumeMoney (FuzzedDataProvider &fuzzed_data_provider, const std::optional< CAmount > &max) noexcept
NodeSeconds ConsumeTime (FuzzedDataProvider &fuzzed_data_provider, const std::optional< int64_t > &min, const std::optional< int64_t > &max) noexcept
std::chrono::seconds ConsumeDuration (FuzzedDataProvider &fuzzed_data_provider, std::chrono::seconds min, std::chrono::seconds max) noexcept
CMutableTransaction ConsumeTransaction (FuzzedDataProvider &fuzzed_data_provider, const std::optional< std::vector< Txid > > &prevout_txids, const int max_num_in, const int max_num_out) noexcept
CScriptWitness ConsumeScriptWitness (FuzzedDataProvider &fuzzed_data_provider, const size_t max_stack_elem_size) noexcept
CScript ConsumeScript (FuzzedDataProvider &fuzzed_data_provider, const bool maybe_p2wsh) noexcept
uint32_t ConsumeSequence (FuzzedDataProvider &fuzzed_data_provider) noexcept
std::map< COutPoint, CoinConsumeCoins (FuzzedDataProvider &fuzzed_data_provider) noexcept
CTxDestination ConsumeTxDestination (FuzzedDataProvider &fuzzed_data_provider) noexcept
CKey ConsumePrivateKey (FuzzedDataProvider &fuzzed_data_provider, std::optional< bool > compressed) noexcept
bool ContainsSpentInput (const CTransaction &tx, const CCoinsViewCache &inputs) noexcept

Function Documentation

◆ ConstructPubKeyBytes()

std::vector< uint8_t > ConstructPubKeyBytes ( FuzzedDataProvider & fuzzed_data_provider,
std::span< const uint8_t > byte_data,
const bool compressed )
noexcept

Definition at line 16 of file util.cpp.

Here is the caller graph for this function:

◆ ConsumeCoins()

std::map< COutPoint, Coin > ConsumeCoins ( FuzzedDataProvider & fuzzed_data_provider)
nodiscardnoexcept

Definition at line 171 of file util.cpp.

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

◆ ConsumeDuration()

std::chrono::seconds ConsumeDuration ( FuzzedDataProvider & fuzzed_data_provider,
std::chrono::seconds min,
std::chrono::seconds max )
nodiscardnoexcept

Definition at line 42 of file util.cpp.

Here is the caller graph for this function:

◆ ConsumeMoney()

CAmount ConsumeMoney ( FuzzedDataProvider & fuzzed_data_provider,
const std::optional< CAmount > & max )
nodiscardnoexcept

Definition at line 29 of file util.cpp.

Here is the caller graph for this function:

◆ ConsumePrivateKey()

CKey ConsumePrivateKey ( FuzzedDataProvider & fuzzed_data_provider,
std::optional< bool > compressed )
nodiscardnoexcept

Definition at line 235 of file util.cpp.

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

◆ ConsumeScript()

CScript ConsumeScript ( FuzzedDataProvider & fuzzed_data_provider,
const bool maybe_p2wsh )
nodiscardnoexcept

Definition at line 98 of file util.cpp.

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

◆ ConsumeScriptWitness()

CScriptWitness ConsumeScriptWitness ( FuzzedDataProvider & fuzzed_data_provider,
const size_t max_stack_elem_size )
nodiscardnoexcept

Definition at line 88 of file util.cpp.

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

◆ ConsumeSequence()

uint32_t ConsumeSequence ( FuzzedDataProvider & fuzzed_data_provider)
nodiscardnoexcept

Definition at line 160 of file util.cpp.

Here is the caller graph for this function:

◆ ConsumeTime()

NodeSeconds ConsumeTime ( FuzzedDataProvider & fuzzed_data_provider,
const std::optional< int64_t > & min,
const std::optional< int64_t > & max )
nodiscardnoexcept

Definition at line 34 of file util.cpp.

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

◆ ConsumeTransaction()

CMutableTransaction ConsumeTransaction ( FuzzedDataProvider & fuzzed_data_provider,
const std::optional< std::vector< Txid > > & prevout_txids,
const int max_num_in,
const int max_num_out )
nodiscardnoexcept

Definition at line 47 of file util.cpp.

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

◆ ConsumeTxDestination()

CTxDestination ConsumeTxDestination ( FuzzedDataProvider & fuzzed_data_provider)
nodiscardnoexcept

Definition at line 189 of file util.cpp.

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

◆ ContainsSpentInput()

bool ContainsSpentInput ( const CTransaction & tx,
const CCoinsViewCache & inputs )
nodiscardnoexcept

Definition at line 245 of file util.cpp.

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