Bitcoin Core  27.99.0
P2P Digital Currency
Functions
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, Span< const uint8_t > byte_data, const bool compressed) noexcept
 
CAmount ConsumeMoney (FuzzedDataProvider &fuzzed_data_provider, const std::optional< CAmount > &max) noexcept
 
int64_t ConsumeTime (FuzzedDataProvider &fuzzed_data_provider, const std::optional< int64_t > &min, const std::optional< int64_t > &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,
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)
noexcept

Definition at line 166 of file util.cpp.

Here is the caller graph for this function:

◆ ConsumeMoney()

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

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 
)
noexcept

Definition at line 227 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 
)
noexcept

Definition at line 93 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 
)
noexcept

Definition at line 83 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)
noexcept

Definition at line 155 of file util.cpp.

Here is the caller graph for this function:

◆ ConsumeTime()

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

Definition at line 34 of file util.cpp.

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 
)
noexcept

Definition at line 42 of file util.cpp.

Here is the call graph for this function:

◆ ConsumeTxDestination()

CTxDestination ConsumeTxDestination ( FuzzedDataProvider fuzzed_data_provider)
noexcept

Definition at line 184 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 
)
noexcept

Definition at line 237 of file util.cpp.

Here is the call graph for this function: