@@ -125,7 +125,7 @@ pub trait ScriptContext:
125125 /// In LegacyP2SH context, scripts above 520 bytes are invalid.
126126 /// Post Tapscript upgrade, this would have to consider other nodes.
127127 /// This does *NOT* recursively check the miniscript fragments.
128- fn check_non_satisfaction_consensus_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
128+ fn check_global_consensus_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
129129 _ms : & Miniscript < Pk , Ctx > ,
130130 ) -> Result < ( ) , ScriptContextError > {
131131 Ok ( ( ) )
@@ -139,7 +139,7 @@ pub trait ScriptContext:
139139 /// scripts over 3600 bytes are invalid.
140140 /// Post Tapscript upgrade, this would have to consider other nodes.
141141 /// This does *NOT* recursively check the miniscript fragments.
142- fn check_non_satisfaction_policy_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
142+ fn check_global_policy_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
143143 _ms : & Miniscript < Pk , Ctx > ,
144144 ) -> Result < ( ) , ScriptContextError > {
145145 Ok ( ( ) )
@@ -149,7 +149,7 @@ pub trait ScriptContext:
149149 /// It is possible that some paths of miniscript may exceed resource limits
150150 /// and our current satisfier and lifting analysis would not work correctly.
151151 /// For example, satisfaction path(Legacy/Segwitv0) may require more than 201 opcodes.
152- fn check_satisfaction_consensus_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
152+ fn check_local_consensus_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
153153 _ms : & Miniscript < Pk , Ctx > ,
154154 ) -> Result < ( ) , ScriptContextError > {
155155 Ok ( ( ) )
@@ -160,31 +160,31 @@ pub trait ScriptContext:
160160 /// and our current satisfier and lifting analysis would not work correctly.
161161 /// For example, satisfaction path in Legacy context scriptSig more
162162 /// than 1650 bytes
163- fn check_satisfaction_policy_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
163+ fn check_local_policy_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
164164 _ms : & Miniscript < Pk , Ctx > ,
165165 ) -> Result < ( ) , ScriptContextError > {
166166 Ok ( ( ) )
167167 }
168168
169169 /// Check the consensus + policy(if not disabled) rules that are not based
170170 /// satisfaction
171- fn check_non_satisfaction_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
171+ fn check_global_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
172172 ms : & Miniscript < Pk , Ctx > ,
173173 ) -> Result < ( ) , ScriptContextError > {
174- Self :: check_non_satisfaction_consensus_rules ( ms) ?;
175- Self :: check_non_satisfaction_policy_rules ( ms) ?;
174+ Self :: check_global_consensus_validity ( ms) ?;
175+ Self :: check_global_policy_validity ( ms) ?;
176176 Ok ( ( ) )
177177 }
178178
179179 /// Check the consensus + policy(if not disabled) rules including the
180180 /// ones for satisfaction
181- fn check_satisfaction_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
181+ fn check_local_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
182182 ms : & Miniscript < Pk , Ctx > ,
183183 ) -> Result < ( ) , ScriptContextError > {
184- Self :: check_non_satisfaction_consensus_rules ( ms) ?;
185- Self :: check_non_satisfaction_consensus_rules ( ms) ?;
186- Self :: check_satisfaction_policy_rules ( ms) ?;
187- Self :: check_satisfaction_policy_rules ( ms) ?;
184+ Self :: check_global_consensus_validity ( ms) ?;
185+ Self :: check_global_consensus_validity ( ms) ?;
186+ Self :: check_local_policy_validity ( ms) ?;
187+ Self :: check_local_policy_validity ( ms) ?;
188188 Ok ( ( ) )
189189 }
190190
@@ -241,7 +241,7 @@ impl ScriptContext for Legacy {
241241 }
242242 }
243243
244- fn check_non_satisfaction_consensus_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
244+ fn check_global_consensus_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
245245 ms : & Miniscript < Pk , Ctx > ,
246246 ) -> Result < ( ) , ScriptContextError > {
247247 if ms. ext . pk_cost > MAX_SCRIPT_ELEMENT_SIZE {
@@ -250,7 +250,7 @@ impl ScriptContext for Legacy {
250250 Ok ( ( ) )
251251 }
252252
253- fn check_satisfaction_consensus_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
253+ fn check_local_consensus_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
254254 ms : & Miniscript < Pk , Ctx > ,
255255 ) -> Result < ( ) , ScriptContextError > {
256256 if let Some ( op_count) = ms. ext . ops_count_sat {
@@ -261,7 +261,7 @@ impl ScriptContext for Legacy {
261261 Ok ( ( ) )
262262 }
263263
264- fn check_satisfaction_policy_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
264+ fn check_local_policy_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
265265 ms : & Miniscript < Pk , Ctx > ,
266266 ) -> Result < ( ) , ScriptContextError > {
267267 if let Some ( size) = ms. max_satisfaction_size ( ) {
@@ -294,7 +294,7 @@ impl ScriptContext for Segwitv0 {
294294 Ok ( ( ) )
295295 }
296296
297- fn check_non_satisfaction_consensus_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
297+ fn check_global_consensus_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
298298 ms : & Miniscript < Pk , Ctx > ,
299299 ) -> Result < ( ) , ScriptContextError > {
300300 if ms. ext . pk_cost > MAX_SCRIPT_SIZE {
@@ -312,7 +312,7 @@ impl ScriptContext for Segwitv0 {
312312 }
313313 }
314314
315- fn check_satisfaction_consensus_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
315+ fn check_local_consensus_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
316316 ms : & Miniscript < Pk , Ctx > ,
317317 ) -> Result < ( ) , ScriptContextError > {
318318 if let Some ( op_count) = ms. ext . ops_count_sat {
@@ -323,7 +323,7 @@ impl ScriptContext for Segwitv0 {
323323 Ok ( ( ) )
324324 }
325325
326- fn check_non_satisfaction_policy_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
326+ fn check_global_policy_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
327327 ms : & Miniscript < Pk , Ctx > ,
328328 ) -> Result < ( ) , ScriptContextError > {
329329 if ms. ext . pk_cost > MAX_STANDARD_P2WSH_SCRIPT_SIZE {
@@ -332,7 +332,7 @@ impl ScriptContext for Segwitv0 {
332332 Ok ( ( ) )
333333 }
334334
335- fn check_satisfaction_policy_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
335+ fn check_local_policy_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
336336 ms : & Miniscript < Pk , Ctx > ,
337337 ) -> Result < ( ) , ScriptContextError > {
338338 // We don't need to know if this is actually a p2wsh as the standard satisfaction for
@@ -372,7 +372,7 @@ impl ScriptContext for Bare {
372372 Ok ( ( ) )
373373 }
374374
375- fn check_non_satisfaction_consensus_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
375+ fn check_global_consensus_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
376376 ms : & Miniscript < Pk , Ctx > ,
377377 ) -> Result < ( ) , ScriptContextError > {
378378 if ms. ext . pk_cost > MAX_SCRIPT_SIZE {
@@ -381,7 +381,7 @@ impl ScriptContext for Bare {
381381 Ok ( ( ) )
382382 }
383383
384- fn check_satisfaction_consensus_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
384+ fn check_local_consensus_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
385385 ms : & Miniscript < Pk , Ctx > ,
386386 ) -> Result < ( ) , ScriptContextError > {
387387 if let Some ( op_count) = ms. ext . ops_count_sat {
@@ -425,25 +425,25 @@ impl ScriptContext for Any {
425425 unreachable ! ( )
426426 }
427427
428- fn check_non_satisfaction_policy_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
428+ fn check_global_policy_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
429429 _ms : & Miniscript < Pk , Ctx > ,
430430 ) -> Result < ( ) , ScriptContextError > {
431431 unreachable ! ( )
432432 }
433433
434- fn check_non_satisfaction_consensus_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
434+ fn check_global_consensus_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
435435 _ms : & Miniscript < Pk , Ctx > ,
436436 ) -> Result < ( ) , ScriptContextError > {
437437 unreachable ! ( )
438438 }
439439
440- fn check_satisfaction_policy_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
440+ fn check_local_policy_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
441441 _ms : & Miniscript < Pk , Ctx > ,
442442 ) -> Result < ( ) , ScriptContextError > {
443443 unreachable ! ( )
444444 }
445445
446- fn check_satisfaction_consensus_rules < Pk : MiniscriptKey , Ctx : ScriptContext > (
446+ fn check_local_consensus_validity < Pk : MiniscriptKey , Ctx : ScriptContext > (
447447 _ms : & Miniscript < Pk , Ctx > ,
448448 ) -> Result < ( ) , ScriptContextError > {
449449 unreachable ! ( )
0 commit comments