@@ -40,7 +40,7 @@ void initialize_tx_pool()
4040 g_setup = testing_setup.get ();
4141
4242 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 )};
4444 if (i < COINBASE_MATURITY) {
4545 // Remember the txids to avoid expensive disk access later on
4646 g_outpoints_coinbase_init_mature.push_back (prevout);
@@ -195,7 +195,8 @@ FUZZ_TARGET(tx_package_eval, .init = initialize_tx_pool)
195195 // Create input
196196 const auto sequence = ConsumeSequence (fuzzed_data_provider);
197197 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+
199200 CTxIn in;
200201 in.prevout = outpoint;
201202 in.nSequence = sequence;
@@ -207,7 +208,7 @@ FUZZ_TARGET(tx_package_eval, .init = initialize_tx_pool)
207208 const auto amount_fee = fuzzed_data_provider.ConsumeIntegralInRange <CAmount>(0 , amount_in);
208209 const auto amount_out = (amount_in - amount_fee) / num_out;
209210 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 );
211212 }
212213 // TODO vary transaction sizes to catch size-related issues
213214 auto tx = MakeTransactionRef (tx_mut);
0 commit comments