@@ -12,7 +12,7 @@ use core::str::FromStr;
1212
1313use bitcoin:: script;
1414
15- use crate :: miniscript:: context:: ScriptContext ;
15+ use crate :: miniscript:: context:: Context ;
1616use crate :: miniscript:: decode:: Terminal ;
1717use crate :: miniscript:: limits:: MAX_PUBKEYS_PER_MULTISIG ;
1818use crate :: prelude:: * ;
@@ -23,16 +23,16 @@ use crate::{
2323
2424/// Contents of a "sortedmulti" descriptor
2525#[ derive( Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
26- pub struct SortedMultiVec < Pk : Key , Ctx : ScriptContext > {
26+ pub struct SortedMultiVec < Pk : Key , Ctx : Context > {
2727 /// signatures required
2828 pub k : usize ,
2929 /// public keys inside sorted Multi
3030 pub pks : Vec < Pk > ,
31- /// The current ScriptContext for sortedmulti
31+ /// The current Context for sortedmulti
3232 pub ( crate ) phantom : PhantomData < Ctx > ,
3333}
3434
35- impl < Pk : Key , Ctx : ScriptContext > SortedMultiVec < Pk , Ctx > {
35+ impl < Pk : Key , Ctx : Context > SortedMultiVec < Pk , Ctx > {
3636 /// Create a new instance of `SortedMultiVec` given a list of keys and the threshold
3737 ///
3838 /// Internally checks all the applicable size limits and pubkey types limitations according to the current `Ctx`.
@@ -98,13 +98,13 @@ impl<Pk: Key, Ctx: ScriptContext> SortedMultiVec<Pk, Ctx> {
9898 }
9999}
100100
101- impl < Pk : Key , Ctx : ScriptContext > ForEachKey < Pk > for SortedMultiVec < Pk , Ctx > {
101+ impl < Pk : Key , Ctx : Context > ForEachKey < Pk > for SortedMultiVec < Pk , Ctx > {
102102 fn for_each_key < ' a , F : FnMut ( & ' a Pk ) -> bool > ( & ' a self , pred : F ) -> bool {
103103 self . pks . iter ( ) . all ( pred)
104104 }
105105}
106106
107- impl < Pk : Key , Ctx : ScriptContext > SortedMultiVec < Pk , Ctx > {
107+ impl < Pk : Key , Ctx : Context > SortedMultiVec < Pk , Ctx > {
108108 /// utility function to sanity a sorted multi vec
109109 pub fn sanity_check ( & self ) -> Result < ( ) , Error > {
110110 let ms: Miniscript < Pk , Ctx > =
@@ -116,7 +116,7 @@ impl<Pk: Key, Ctx: ScriptContext> SortedMultiVec<Pk, Ctx> {
116116 }
117117}
118118
119- impl < Pk : Key , Ctx : ScriptContext > SortedMultiVec < Pk , Ctx > {
119+ impl < Pk : Key , Ctx : Context > SortedMultiVec < Pk , Ctx > {
120120 /// Create Terminal::Multi containing sorted pubkeys
121121 pub fn sorted_node ( & self ) -> Terminal < Pk , Ctx >
122122 where
@@ -194,7 +194,7 @@ impl<Pk: Key, Ctx: ScriptContext> SortedMultiVec<Pk, Ctx> {
194194 }
195195}
196196
197- impl < Pk : Key , Ctx : ScriptContext > policy:: Liftable < Pk > for SortedMultiVec < Pk , Ctx > {
197+ impl < Pk : Key , Ctx : Context > policy:: Liftable < Pk > for SortedMultiVec < Pk , Ctx > {
198198 fn lift ( & self ) -> Result < policy:: semantic:: Policy < Pk > , Error > {
199199 let ret = policy:: semantic:: Policy :: Threshold (
200200 self . k ,
@@ -207,13 +207,13 @@ impl<Pk: Key, Ctx: ScriptContext> policy::Liftable<Pk> for SortedMultiVec<Pk, Ct
207207 }
208208}
209209
210- impl < Pk : Key , Ctx : ScriptContext > fmt:: Debug for SortedMultiVec < Pk , Ctx > {
210+ impl < Pk : Key , Ctx : Context > fmt:: Debug for SortedMultiVec < Pk , Ctx > {
211211 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
212212 fmt:: Display :: fmt ( self , f)
213213 }
214214}
215215
216- impl < Pk : Key , Ctx : ScriptContext > fmt:: Display for SortedMultiVec < Pk , Ctx > {
216+ impl < Pk : Key , Ctx : Context > fmt:: Display for SortedMultiVec < Pk , Ctx > {
217217 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
218218 write ! ( f, "sortedmulti({}" , self . k) ?;
219219 for k in & self . pks {
0 commit comments