Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bip-0360/ref-impl/common/tests/data/p2mr_construction.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
3 changes: 3 additions & 0 deletions bip-0360/ref-impl/rust/tests/p2mr_construction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand Down
3 changes: 3 additions & 0 deletions bip-0360/ref-impl/rust/tests/p2mr_pqc_construction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand Down