You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Valid 2-path multipath descriptor should now pass
885
+
// Valid 2-path multipath descriptor should pass
886
886
let descriptor = "wpkh(tpubD6NzVbkrYhZ4XHndKkuB8FifXm8r5FQHwrN6oZuWCz13qb93rtgKvD4PQsqC4HP4yhV3tA2fqr2RbY5mNXfM7RxXUoeABoDtsFUq2zJq6YK/<0;1>/*)";
887
887
let(descriptor, _) = descriptor
888
888
.into_wallet_descriptor(&secp,Network::Testnet)
@@ -978,36 +978,4 @@ mod test {
978
978
979
979
Ok(())
980
980
}
981
-
982
-
#[test]
983
-
fntest_multipath_descriptor_validation(){
984
-
let secp = Secp256k1::new();
985
-
986
-
// Test that 2-path multipath descriptor passes validation
987
-
let descriptor_str = "wpkh([9a6a2580/84'/1'/0']tpubDDnGNapGEY6AZAdQbfRJgMg9fvz8pUBrLwvyvUqEgcUfgzM6zc2eVK4vY9x9L5FJWdX8WumXuLEDV5zDZnTfbn87vLe9XceCFwTu9so9Kks/<0;1>/*)";
let result = check_wallet_descriptor(&descriptor);
993
-
assert!(result.is_ok());
994
-
995
-
// Test that 1-path descriptor (non-multipath) still works
996
-
let descriptor_str = "wpkh([9a6a2580/84'/1'/0']tpubDDnGNapGEY6AZAdQbfRJgMg9fvz8pUBrLwvyvUqEgcUfgzM6zc2eVK4vY9x9L5FJWdX8WumXuLEDV5zDZnTfbn87vLe9XceCFwTu9so9Kks/0/*)";
997
-
let(descriptor, _) = descriptor_str
998
-
.into_wallet_descriptor(&secp,Network::Testnet)
999
-
.expect("should parse single-path descriptor");
1000
-
1001
-
let result = check_wallet_descriptor(&descriptor);
1002
-
assert!(result.is_ok());
1003
-
1004
-
// Test that 3-path multipath descriptor fails validation
1005
-
let descriptor_str = "wpkh([9a6a2580/84'/1'/0']tpubDDnGNapGEY6AZAdQbfRJgMg9fvz8pUBrLwvyvUqEgcUfgzM6zc2eVK4vY9x9L5FJWdX8WumXuLEDV5zDZnTfbn87vLe9XceCFwTu9so9Kks/<0;1;2>/*)";
0 commit comments