mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
fuzz: improve utxo_snapshot target
Add the possibility of giving more guidance to the creation of the metadata and/or coins, so that the fuzzer gets the chance to reach more error conditions in ActivateSnapshot and sometimes successfully creates a valid snapshot. This also changes the asserts for the success case that were outdated, and only didn't result in a crash because the fuzzer wasn't able to reach this code before.
This commit is contained in:
@@ -495,12 +495,19 @@ public:
|
||||
};
|
||||
|
||||
m_assumeutxo_data = {
|
||||
{
|
||||
{ // For use by unit tests
|
||||
.height = 110,
|
||||
.hash_serialized = AssumeutxoHash{uint256S("0x6657b736d4fe4db0cbc796789e812d5dba7f5c143764b1b6905612f1830609d1")},
|
||||
.nChainTx = 111,
|
||||
.blockhash = uint256S("0x696e92821f65549c7ee134edceeeeaaa4105647a3c4fd9f298c0aec0ab50425c")
|
||||
},
|
||||
{
|
||||
// For use by fuzz target src/test/fuzz/utxo_snapshot.cpp
|
||||
.height = 200,
|
||||
.hash_serialized = AssumeutxoHash{uint256S("0x4f34d431c3e482f6b0d67b64609ece3964dc8d7976d02ac68dd7c9c1421738f2")},
|
||||
.nChainTx = 201,
|
||||
.blockhash = uint256S("0x5e93653318f294fb5aa339d00bbf8cf1c3515488ad99412c37608b139ea63b27"),
|
||||
},
|
||||
{
|
||||
// For use by test/functional/feature_assumeutxo.py
|
||||
.height = 299,
|
||||
|
||||
Reference in New Issue
Block a user