diff --git a/src/kernel/chainparams.cpp b/src/kernel/chainparams.cpp index 4a747e7317c..6b64c79d05c 100644 --- a/src/kernel/chainparams.cpp +++ b/src/kernel/chainparams.cpp @@ -589,9 +589,9 @@ public: { // For use by fuzz target src/test/fuzz/utxo_snapshot.cpp .height = 200, - .hash_serialized = AssumeutxoHash{uint256{"7e3b7780fbd2fa479a01f66950dc8f728dc1b11f03d06d5bf223168520df3a48"}}, + .hash_serialized = AssumeutxoHash{uint256{"17dcc016d188d16068907cdeb38b75691a118d43053b8cd6a25969419381d13a"}}, .m_chain_tx_count = 201, - .blockhash = consteval_ctor(uint256{"5e93653318f294fb5aa339d00bbf8cf1c3515488ad99412c37608b139ea63b27"}), + .blockhash = consteval_ctor(uint256{"385901ccbd69dff6bbd00065d01fb8a9e464dede7cfe0372443884f9b1dcf6b9"}), }, { // For use by test/functional/feature_assumeutxo.py diff --git a/src/test/fuzz/utxo_total_supply.cpp b/src/test/fuzz/utxo_total_supply.cpp index e574c5b85c5..9be85df99fa 100644 --- a/src/test/fuzz/utxo_total_supply.cpp +++ b/src/test/fuzz/utxo_total_supply.cpp @@ -52,6 +52,7 @@ FUZZ_TARGET(utxo_total_supply) // Replace OP_FALSE with OP_TRUE { CMutableTransaction tx{*block->vtx.back()}; + tx.nLockTime = 0; // Use the same nLockTime for all as we want to duplicate one of them. tx.vout.at(0).scriptPubKey = CScript{} << OP_TRUE; block->vtx.back() = MakeTransactionRef(tx); } diff --git a/src/test/util/mining.cpp b/src/test/util/mining.cpp index 8baac7bba3e..1cd8f8ee718 100644 --- a/src/test/util/mining.cpp +++ b/src/test/util/mining.cpp @@ -17,6 +17,8 @@ #include #include +#include + using node::BlockAssembler; using node::NodeContext; @@ -34,12 +36,15 @@ std::vector> CreateBlockChain(size_t total_height, const { std::vector> ret{total_height}; auto time{params.GenesisBlock().nTime}; + // NOTE: here `height` does not correspond to the block height but the block height - 1. for (size_t height{0}; height < total_height; ++height) { CBlock& block{*(ret.at(height) = std::make_shared())}; CMutableTransaction coinbase_tx; + coinbase_tx.nLockTime = static_cast(height); coinbase_tx.vin.resize(1); coinbase_tx.vin[0].prevout.SetNull(); + coinbase_tx.vin[0].nSequence = CTxIn::MAX_SEQUENCE_NONFINAL; // Make sure timelock is enforced. coinbase_tx.vout.resize(1); coinbase_tx.vout[0].scriptPubKey = P2WSH_OP_TRUE; coinbase_tx.vout[0].nValue = GetBlockSubsidy(height + 1, params.GetConsensus());