@@ -40,7 +40,7 @@ void initialize_tx_pool()
40
40
g_setup = testing_setup.get ();
41
41
42
42
for (int i = 0 ; i < 2 * COINBASE_MATURITY; ++i) {
43
- COutPoint prevout{MineBlock (g_setup->m_node , P2WSH_OP_TRUE )};
43
+ COutPoint prevout{MineBlock (g_setup->m_node , P2WSH_EMPTY )};
44
44
if (i < COINBASE_MATURITY) {
45
45
// Remember the txids to avoid expensive disk access later on
46
46
g_outpoints_coinbase_init_mature.push_back (prevout);
@@ -195,7 +195,8 @@ FUZZ_TARGET(tx_package_eval, .init = initialize_tx_pool)
195
195
// Create input
196
196
const auto sequence = ConsumeSequence (fuzzed_data_provider);
197
197
const auto script_sig = CScript{};
198
- const auto script_wit_stack = std::vector<std::vector<uint8_t >>{WITNESS_STACK_ELEM_OP_TRUE};
198
+ const auto script_wit_stack = fuzzed_data_provider.ConsumeBool () ? P2WSH_EMPTY_TRUE_STACK : P2WSH_EMPTY_TWO_STACK;
199
+
199
200
CTxIn in;
200
201
in.prevout = outpoint;
201
202
in.nSequence = sequence;
@@ -207,7 +208,7 @@ FUZZ_TARGET(tx_package_eval, .init = initialize_tx_pool)
207
208
const auto amount_fee = fuzzed_data_provider.ConsumeIntegralInRange <CAmount>(0 , amount_in);
208
209
const auto amount_out = (amount_in - amount_fee) / num_out;
209
210
for (int i = 0 ; i < num_out; ++i) {
210
- tx_mut.vout .emplace_back (amount_out, P2WSH_OP_TRUE );
211
+ tx_mut.vout .emplace_back (amount_out, P2WSH_EMPTY );
211
212
}
212
213
// TODO vary transaction sizes to catch size-related issues
213
214
auto tx = MakeTransactionRef (tx_mut);
0 commit comments