-
Notifications
You must be signed in to change notification settings - Fork 39.1k
fuzz: improve utxo_snapshot target #30329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -495,12 +495,19 @@ class CRegTestParams : public CChainParams | |
| }; | ||
|
|
||
| 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"), | ||
|
Comment on lines
+506
to
+509
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In commit "fuzz: improve utxo_snapshot target" (de71d4d) Since fuzz test is not deterministic, and doesn't give us an easy way to know hash values here actually allow snapshot to be loaded, it might be good to write a separate regtest generating a an empty chain with height 200 and verifying these hashes. |
||
| }, | ||
| { | ||
| // For use by test/functional/feature_assumeutxo.py | ||
| .height = 299, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe also list the filename here, like in the other cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't do that because there are already multiple files that use it (
validation_chainstatemanager_tests,validation_chainstate_tests). Seems less likely that the same would happen for fuzz tests.