mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
qa: correct off-by-one in utxo snapshot fuzz target
The chain starts at block 1, not genesis.
This commit is contained in:
parent
785649f397
commit
d1527f6b88
2 changed files with 2 additions and 2 deletions
|
@ -623,7 +623,7 @@ public:
|
||||||
{
|
{
|
||||||
// For use by fuzz target src/test/fuzz/utxo_snapshot.cpp
|
// For use by fuzz target src/test/fuzz/utxo_snapshot.cpp
|
||||||
.height = 200,
|
.height = 200,
|
||||||
.hash_serialized = AssumeutxoHash{uint256{"4f34d431c3e482f6b0d67b64609ece3964dc8d7976d02ac68dd7c9c1421738f2"}},
|
.hash_serialized = AssumeutxoHash{uint256{"7e3b7780fbd2fa479a01f66950dc8f728dc1b11f03d06d5bf223168520df3a48"}},
|
||||||
.m_chain_tx_count = 201,
|
.m_chain_tx_count = 201,
|
||||||
.blockhash = consteval_ctor(uint256{"5e93653318f294fb5aa339d00bbf8cf1c3515488ad99412c37608b139ea63b27"}),
|
.blockhash = consteval_ctor(uint256{"5e93653318f294fb5aa339d00bbf8cf1c3515488ad99412c37608b139ea63b27"}),
|
||||||
},
|
},
|
||||||
|
|
|
@ -101,7 +101,7 @@ void utxo_snapshot_fuzz(FuzzBufferType buffer)
|
||||||
std::vector<uint8_t> file_data{ConsumeRandomLengthByteVector(fuzzed_data_provider)};
|
std::vector<uint8_t> file_data{ConsumeRandomLengthByteVector(fuzzed_data_provider)};
|
||||||
outfile << Span{file_data};
|
outfile << Span{file_data};
|
||||||
} else {
|
} else {
|
||||||
int height{0};
|
int height{1};
|
||||||
for (const auto& block : *g_chain) {
|
for (const auto& block : *g_chain) {
|
||||||
auto coinbase{block->vtx.at(0)};
|
auto coinbase{block->vtx.at(0)};
|
||||||
outfile << coinbase->GetHash();
|
outfile << coinbase->GetHash();
|
||||||
|
|
Loading…
Add table
Reference in a new issue