qa: correct off-by-one in utxo snapshot fuzz target

The chain starts at block 1, not genesis.
This commit is contained in:
Antoine Poinsot 2025-02-19 15:56:45 -05:00
parent 785649f397
commit d1527f6b88
2 changed files with 2 additions and 2 deletions

View file

@ -623,7 +623,7 @@ public:
{
// For use by fuzz target src/test/fuzz/utxo_snapshot.cpp
.height = 200,
.hash_serialized = AssumeutxoHash{uint256{"4f34d431c3e482f6b0d67b64609ece3964dc8d7976d02ac68dd7c9c1421738f2"}},
.hash_serialized = AssumeutxoHash{uint256{"7e3b7780fbd2fa479a01f66950dc8f728dc1b11f03d06d5bf223168520df3a48"}},
.m_chain_tx_count = 201,
.blockhash = consteval_ctor(uint256{"5e93653318f294fb5aa339d00bbf8cf1c3515488ad99412c37608b139ea63b27"}),
},

View file

@ -101,7 +101,7 @@ void utxo_snapshot_fuzz(FuzzBufferType buffer)
std::vector<uint8_t> file_data{ConsumeRandomLengthByteVector(fuzzed_data_provider)};
outfile << Span{file_data};
} else {
int height{0};
int height{1};
for (const auto& block : *g_chain) {
auto coinbase{block->vtx.at(0)};
outfile << coinbase->GetHash();