diff --git a/bip-0360/ref-impl/common/tests/data/p2mr_construction.json b/bip-0360/ref-impl/common/tests/data/p2mr_construction.json index 166b7a8d8c..c6b9068384 100644 --- a/bip-0360/ref-impl/common/tests/data/p2mr_construction.json +++ b/bip-0360/ref-impl/common/tests/data/p2mr_construction.json @@ -57,7 +57,7 @@ }, { "id": "p2mr_different_version_leaves", - "objective": "Tests P2MR with two script leaves of different versions. TO-DO: currently ignores given leaf version and over-rides. Probably better to throw error", + "objective": "Tests P2MR with two script leaves of different versions. An unknown leaf version should be accepted and the P2MR output constructed successfully.", "given": { "scriptTree": [ { diff --git a/bip-0360/ref-impl/rust/tests/p2mr_construction.rs b/bip-0360/ref-impl/rust/tests/p2mr_construction.rs index bf1f9bbf09..e9d93f7b91 100644 --- a/bip-0360/ref-impl/rust/tests/p2mr_construction.rs +++ b/bip-0360/ref-impl/rust/tests/p2mr_construction.rs @@ -65,6 +65,9 @@ fn test_p2mr_single_leaf_script_tree() { process_test_vector_p2mr(test_vector).unwrap(); } +/// Verifies that P2MR construction succeeds when leaves carry non-standard leaf versions (e.g. 0xfa). +/// Unknown leaf versions are accepted: the TapLeaf hash is computed using the supplied version, +/// and the resulting merkle root and control blocks are valid. #[test] fn test_p2mr_different_version_leaves() { diff --git a/bip-0360/ref-impl/rust/tests/p2mr_pqc_construction.rs b/bip-0360/ref-impl/rust/tests/p2mr_pqc_construction.rs index 6a7ec8f926..22f13ae411 100644 --- a/bip-0360/ref-impl/rust/tests/p2mr_pqc_construction.rs +++ b/bip-0360/ref-impl/rust/tests/p2mr_pqc_construction.rs @@ -52,6 +52,9 @@ fn test_p2mr_pqc_single_leaf_script_tree() { process_test_vector_p2mr(test_vector).unwrap(); } +/// Verifies that P2MR construction succeeds when leaves carry non-standard leaf versions (e.g. 0xfa). +/// Unknown leaf versions are accepted: the TapLeaf hash is computed using the supplied version, +/// and the resulting merkle root and control blocks are valid. #[test] fn test_p2mr_pqc_different_version_leaves() {