Skip to content

Commit d1527f6

Browse files
committed
qa: correct off-by-one in utxo snapshot fuzz target
The chain starts at block 1, not genesis.
1 parent 785649f commit d1527f6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/kernel/chainparams.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ class CRegTestParams : public CChainParams
623623
{
624624
// For use by fuzz target src/test/fuzz/utxo_snapshot.cpp
625625
.height = 200,
626-
.hash_serialized = AssumeutxoHash{uint256{"4f34d431c3e482f6b0d67b64609ece3964dc8d7976d02ac68dd7c9c1421738f2"}},
626+
.hash_serialized = AssumeutxoHash{uint256{"7e3b7780fbd2fa479a01f66950dc8f728dc1b11f03d06d5bf223168520df3a48"}},
627627
.m_chain_tx_count = 201,
628628
.blockhash = consteval_ctor(uint256{"5e93653318f294fb5aa339d00bbf8cf1c3515488ad99412c37608b139ea63b27"}),
629629
},

src/test/fuzz/utxo_snapshot.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void utxo_snapshot_fuzz(FuzzBufferType buffer)
101101
std::vector<uint8_t> file_data{ConsumeRandomLengthByteVector(fuzzed_data_provider)};
102102
outfile << Span{file_data};
103103
} else {
104-
int height{0};
104+
int height{1};
105105
for (const auto& block : *g_chain) {
106106
auto coinbase{block->vtx.at(0)};
107107
outfile << coinbase->GetHash();

0 commit comments

Comments
 (0)