@@ -998,33 +998,6 @@ impl PsbtOutputExt for psbt::Output {
998
998
}
999
999
}
1000
1000
1001
- // Traverse the pkh lookup while maintaining a reverse map for storing the map
1002
- // hash160 -> (XonlyPublicKey)/PublicKey
1003
- struct XOnlyHashLookUp (
1004
- pub BTreeMap < hash160:: Hash , bitcoin:: XOnlyPublicKey > ,
1005
- pub secp256k1:: Secp256k1 < VerifyOnly > ,
1006
- ) ;
1007
-
1008
- impl Translator < DefiniteDescriptorKey , bitcoin:: PublicKey , descriptor:: ConversionError >
1009
- for XOnlyHashLookUp
1010
- {
1011
- fn pk (
1012
- & mut self ,
1013
- xpk : & DefiniteDescriptorKey ,
1014
- ) -> Result < bitcoin:: PublicKey , descriptor:: ConversionError > {
1015
- xpk. derive_public_key ( & self . 1 )
1016
- }
1017
-
1018
- // TODO: cleanup this code in a later commit
1019
-
1020
- // Clone all the associated types in translation
1021
- translate_hash_clone ! (
1022
- DescriptorPublicKey ,
1023
- bitcoin:: PublicKey ,
1024
- descriptor:: ConversionError
1025
- ) ;
1026
- }
1027
-
1028
1001
// Traverse the pkh lookup while maintaining a reverse map for storing the map
1029
1002
// hash160 -> (XonlyPublicKey)/PublicKey
1030
1003
struct KeySourceLookUp (
@@ -1155,9 +1128,7 @@ fn update_item_with_descriptor_helper<F: PsbtFields>(
1155
1128
let secp = secp256k1:: Secp256k1 :: verification_only ( ) ;
1156
1129
1157
1130
let derived = if let Descriptor :: Tr ( _) = & descriptor {
1158
- let mut hash_lookup = XOnlyHashLookUp ( BTreeMap :: new ( ) , secp) ;
1159
- // Feed in information about pkh -> pk mapping here
1160
- let derived = descriptor. translate_pk ( & mut hash_lookup) ?;
1131
+ let derived = descriptor. derived_descriptor ( & secp) ?;
1161
1132
1162
1133
if let Some ( check_script) = check_script {
1163
1134
if check_script != & derived. script_pubkey ( ) {
0 commit comments