Skip to content

Commit 7bbada5

Browse files
committed
Remove duplicated tests
1 parent 048fadc commit 7bbada5

File tree

1 file changed

+1
-33
lines changed

1 file changed

+1
-33
lines changed

wallet/src/descriptor/mod.rs

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ mod test {
882882

883883
assert_matches!(result, Err(DescriptorError::HardenedDerivationXpub));
884884

885-
// Valid 2-path multipath descriptor should now pass
885+
// Valid 2-path multipath descriptor should pass
886886
let descriptor = "wpkh(tpubD6NzVbkrYhZ4XHndKkuB8FifXm8r5FQHwrN6oZuWCz13qb93rtgKvD4PQsqC4HP4yhV3tA2fqr2RbY5mNXfM7RxXUoeABoDtsFUq2zJq6YK/<0;1>/*)";
887887
let (descriptor, _) = descriptor
888888
.into_wallet_descriptor(&secp, Network::Testnet)
@@ -978,36 +978,4 @@ mod test {
978978

979979
Ok(())
980980
}
981-
982-
#[test]
983-
fn test_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>/*)";
988-
let (descriptor, _) = descriptor_str
989-
.into_wallet_descriptor(&secp, Network::Testnet)
990-
.expect("should parse 2-path multipath descriptor");
991-
992-
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>/*)";
1006-
let (descriptor, _) = descriptor_str
1007-
.into_wallet_descriptor(&secp, Network::Testnet)
1008-
.expect("should parse 3-path multipath descriptor");
1009-
1010-
let result = check_wallet_descriptor(&descriptor);
1011-
assert!(matches!(result, Err(DescriptorError::MultiPath)));
1012-
}
1013981
}

0 commit comments

Comments
 (0)