31 const std::optional<CMutableTransaction> mutable_transaction = ConsumeDeserializable<CMutableTransaction>(fuzzed_data_provider);
33 const unsigned int n_in = fuzzed_data_provider.
ConsumeIntegral<
unsigned int>();
35 const bool store = fuzzed_data_provider.
ConsumeBool();
39 const auto random_bytes = fuzzed_data_provider.
ConsumeBytes<
unsigned char>(64);
41 if (random_bytes.size() == 64) {
42 (void)caching_transaction_signature_checker.VerifySchnorrSignature(random_bytes, pub_key,
ConsumeUInt256(fuzzed_data_provider));
46 const auto pub_key = ConsumeDeserializable<CPubKey>(fuzzed_data_provider);
48 if (!random_bytes.empty()) {
49 (void)caching_transaction_signature_checker.VerifyECDSASignature(random_bytes, *pub_key,
ConsumeUInt256(fuzzed_data_provider));
int64_t CAmount
Amount in satoshis (Can be negative)
void SelectParams(const std::string &network)
Sets the params returned by Params() to those for the given chain name.
static const std::string REGTEST
The basic transaction that is broadcasted on the network and contained in blocks.
Users of this module must hold an ECCVerifyHandle.
std::vector< T > ConsumeBytes(size_t num_bytes)
void ECC_Start()
Initialize the elliptic curve support.
FUZZ_TARGET_INIT(script_sigcache, initialize_script_sigcache)
void initialize_script_sigcache()
void InitSignatureCache()
A mutable version of CTransaction.
CAmount ConsumeMoney(FuzzedDataProvider &fuzzed_data_provider, const std::optional< CAmount > &max) noexcept
uint256 ConsumeUInt256(FuzzedDataProvider &fuzzed_data_provider) noexcept
std::vector< uint8_t > ConsumeRandomLengthByteVector(FuzzedDataProvider &fuzzed_data_provider, const std::optional< size_t > &max_length=std::nullopt) noexcept