@@ -135,20 +135,20 @@ impl<Pk: MiniscriptKey> Policy<Pk> {
135135 /// pk_map.insert(String::from("bob_pk"), bitcoin::PublicKey::from_str(bob_pk).unwrap());
136136 /// let mut t = StrPkTranslator { pk_map: pk_map };
137137 ///
138- /// let real_policy = placeholder_policy.translate_pkh (&mut t).unwrap();
138+ /// let real_policy = placeholder_policy.translate_pk (&mut t).unwrap();
139139 ///
140140 /// let expected_policy = Policy::from_str(&format!("and(pk({}),pk({}))", alice_pk, bob_pk)).unwrap();
141141 /// assert_eq!(real_policy, expected_policy);
142142 /// ```
143- pub fn translate_pkh < Q , E , T > ( & self , t : & mut T ) -> Result < Policy < Q > , E >
143+ pub fn translate_pk < Q , E , T > ( & self , t : & mut T ) -> Result < Policy < Q > , E >
144144 where
145145 T : Translator < Pk , Q , E > ,
146146 Q : MiniscriptKey ,
147147 {
148- self . _translate_pkh ( t)
148+ self . _translate_pk ( t)
149149 }
150150
151- fn _translate_pkh < Q , E , T > ( & self , t : & mut T ) -> Result < Policy < Q > , E >
151+ fn _translate_pk < Q , E , T > ( & self , t : & mut T ) -> Result < Policy < Q > , E >
152152 where
153153 T : Translator < Pk , Q , E > ,
154154 Q : MiniscriptKey ,
@@ -165,7 +165,7 @@ impl<Pk: MiniscriptKey> Policy<Pk> {
165165 Policy :: Older ( n) => Ok ( Policy :: Older ( n) ) ,
166166 Policy :: Threshold ( k, ref subs) => {
167167 let new_subs: Result < Vec < Policy < Q > > , _ > =
168- subs. iter ( ) . map ( |sub| sub. _translate_pkh ( t) ) . collect ( ) ;
168+ subs. iter ( ) . map ( |sub| sub. _translate_pk ( t) ) . collect ( ) ;
169169 new_subs. map ( |ok| Policy :: Threshold ( k, ok) )
170170 }
171171 }
0 commit comments