Repository navigation
Fix BIP113 MTP CLTV validation fixture and un-ignore test - #15
Merged
Merged
Conversation
The ignore blamed pending validate_with_context MTP wiring, but the test only calls get_test_median_time_past. required_locktime was base+3000, equal to mid-index MTP, so the strict < assert failed under --ignored. Raise required_locktime to base+3600 and document the mid-index MTP.
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#[ignore]ontest_median_time_past_cltv_validation_logicwas stale: it blamed pendingvalidate_with_contextMTP wiring, but the body never calls that API — onlyget_test_median_time_past.--ignored, the assert failed because MTP equalsrequired_locktime: for 11 timestampsbase + i*600, mid-index MTP isT[5] = base+3000, and the fixture setrequired_locktime = base+3000.required_locktimetobase+3600so the intended unsatisfied CLTV case (median < required_locktime) holds; assert MTP equality explicitly and document mid-index behavior; drop#[ignore]and rewrite the comment.Numbers
base+3000)base+3000)base+3000)base+3600)Test plan
cargo fmt/cargo fmt --checkCARGO_INCREMENTAL=0 cargo check(path patch aside)cargo test --test engineering_suite engineering::bip113_integration_tests::test_median_time_past_cltv_validation_logic -- --exact→ ok (no--ignored)