Repository navigation
test: do not tie the MNHF signal snapshot test to the number of deployments - #8150
Conversation
…yments mnhf_signals_outnumbering_deployments_are_valid built four signals and required that to exceed MAX_VERSION_BITS_DEPLOYMENTS, so it fails as soon as a fourth deployment is added. EvoSnapshot::Validate() bounds the map by VERSIONBITS_NUM_BITS only. Fill every version bit instead, which is the largest valid map whatever the number of deployments is.
|
No actionable comments were generated in the recent review. WalkthroughThe Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk:
|
|
🕓 Review not started yet because the new head is waiting for the 30-minute push debounce.
Commit 8bc9594. Normal review starts when eligible; priority review starts as soon as a slot is available. |
Issue being fixed or feature implemented
mnhf_signals_outnumbering_deployments_are_validinevo_snapshot_tests.cppbuilds four MNHF signals and requires that count to exceedConsensus::MAX_VERSION_BITS_DEPLOYMENTS. There are three deployments today, so the test fails with[4 <= 4]as soon as a fourth one is added, although nothing about the snapshot code changed. Discovered here: #8089 (comment)What was done?
EvoSnapshot::Validate()bounds the signal map byVERSIONBITS_NUM_BITSonly. The test now fills one signal for every version bit, which is the largest valid map whatever the number of deployments is, and no longer references the deployment enum.How Has This Been Tested?
Changed test:
evo_snapshot_tests/mnhf_signals_outnumbering_deployments_are_validnow validates, hashes and round-trips a snapshot whose signal map hasVERSIONBITS_NUM_BITSentries.Breaking Changes
None.
Checklist: