20 if (buffer.size() > 100'000)
return;
25 unsigned int verify_flags;
30 unsigned int fuzzed_flags;
33 std::vector<CTxOut> spent_outputs;
34 for (
unsigned i = 0; i < tx.
vin.size(); ++i) {
41 spent_outputs.push_back(prevout);
44 txdata.
Init(tx, std::move(spent_outputs));
46 for (
unsigned i = 0; i < tx.
vin.size(); ++i) {
56 verify_flags &= ~fuzzed_flags;
58 verify_flags |= fuzzed_flags;
63 const bool ret_fuzzed =
VerifyScript(tx.
vin.at(i).scriptSig, prevout.
scriptPubKey, &tx.
vin.at(i).scriptWitness, verify_flags, checker, &serror_fuzzed);
68 }
catch (
const std::ios_base::failure&) {
bool MoneyRange(const CAmount &nValue)
The basic transaction that is broadcasted on the network and contained in blocks.
const std::vector< CTxIn > vin
An output of a transaction.
Double ended buffer combining vector and stream-like interfaces.
bool VerifyScript(const CScript &scriptSig, const CScript &scriptPubKey, const CScriptWitness *witness, unsigned int flags, const BaseSignatureChecker &checker, ScriptError *serror)
@ ASSERT_FAIL
Abort execution through assertion failure (for consensus code)
static constexpr TransactionSerParams TX_WITH_WITNESS
enum ScriptError_t ScriptError
FUZZ_TARGET(script_flags)
constexpr deserialize_type deserialize
void Init(const T &tx, std::vector< CTxOut > &&spent_outputs, bool force=false)
Initialize this PrecomputedTransactionData with transaction data.
std::vector< CTxOut > m_spent_outputs
bool IsValidFlagCombination(unsigned flags)
Flags that are not forbidden by an assert in script validation.