diff --git a/src/miniscript/context.rs b/src/miniscript/context.rs index 44da0bc6a..9dc2f828e 100644 --- a/src/miniscript/context.rs +++ b/src/miniscript/context.rs @@ -188,7 +188,7 @@ where /// Check whether the given satisfaction is valid under the ScriptContext /// For example, segwit satisfactions may fail if the witness len is more /// 3600 or number of stack elements are more than 100. - fn check_witness(_witness: &[Vec]) -> Result<(), ScriptContextError> { + fn check_witness(_witness: &[Vec]) -> Result<(), ScriptContextError> { // Only really need to do this for segwitv0 and legacy // Bare is already restrcited by standardness rules // and would reach these limits. @@ -387,7 +387,7 @@ impl ScriptContext for Legacy { } } - fn check_witness(witness: &[Vec]) -> Result<(), ScriptContextError> { + fn check_witness(witness: &[Vec]) -> Result<(), ScriptContextError> { // In future, we could avoid by having a function to count only // len of script instead of converting it. if witness_to_scriptsig(witness).len() > MAX_SCRIPTSIG_SIZE { @@ -487,7 +487,7 @@ impl ScriptContext for Segwitv0 { } } - fn check_witness(witness: &[Vec]) -> Result<(), ScriptContextError> { + fn check_witness(witness: &[Vec]) -> Result<(), ScriptContextError> { if witness.len() > MAX_STANDARD_P2WSH_STACK_ITEMS { return Err(ScriptContextError::MaxWitnessItemssExceeded { actual: witness.len(), @@ -595,7 +595,7 @@ impl ScriptContext for Tap { } } - fn check_witness(witness: &[Vec]) -> Result<(), ScriptContextError> { + fn check_witness(witness: &[Vec]) -> Result<(), ScriptContextError> { // Note that tapscript has a 1000 limit compared to 100 of segwitv0 if witness.len() > MAX_STACK_SIZE { return Err(ScriptContextError::MaxWitnessItemssExceeded { @@ -828,7 +828,7 @@ impl ScriptContext for NoChecks { "NochecksEcdsa" } - fn check_witness(_witness: &[Vec]) -> Result<(), ScriptContextError> { + fn check_witness(_witness: &[Vec]) -> Result<(), ScriptContextError> { // Only really need to do this for segwitv0 and legacy // Bare is already restrcited by standardness rules // and would reach these limits. diff --git a/src/miniscript/mod.rs b/src/miniscript/mod.rs index 28349e427..bd304893e 100644 --- a/src/miniscript/mod.rs +++ b/src/miniscript/mod.rs @@ -224,7 +224,7 @@ impl Miniscript { { match satisfaction.stack { satisfy::Witness::Stack(stack) => { - Ctx::check_witness::(&stack)?; + Ctx::check_witness(&stack)?; Ok(stack) } satisfy::Witness::Unavailable | satisfy::Witness::Impossible => {