Skip to content

Commit 3b7be4e

Browse files
committed
fix: fix typo for MaxWitnessItemsExceeded
1 parent 7ae7596 commit 3b7be4e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/miniscript/context.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub enum ScriptContextError {
4242
UncompressedKeysNotAllowed,
4343
/// At least one satisfaction path in the Miniscript fragment has more than
4444
/// `MAX_STANDARD_P2WSH_STACK_ITEMS` (100) witness elements.
45-
MaxWitnessItemssExceeded { actual: usize, limit: usize },
45+
MaxWitnessItemsExceeded { actual: usize, limit: usize },
4646
/// At least one satisfaction path in the Miniscript fragment contains more
4747
/// than `MAX_OPS_PER_SCRIPT`(201) opcodes.
4848
MaxOpCountExceeded,
@@ -79,7 +79,7 @@ impl error::Error for ScriptContextError {
7979
| CompressedOnly(_)
8080
| XOnlyKeysNotAllowed(_, _)
8181
| UncompressedKeysNotAllowed
82-
| MaxWitnessItemssExceeded { .. }
82+
| MaxWitnessItemsExceeded { .. }
8383
| MaxOpCountExceeded
8484
| MaxWitnessScriptSizeExceeded
8585
| MaxRedeemScriptSizeExceeded
@@ -110,7 +110,7 @@ impl fmt::Display for ScriptContextError {
110110
ScriptContextError::UncompressedKeysNotAllowed => {
111111
write!(f, "uncompressed keys cannot be used in Taproot descriptors.")
112112
}
113-
ScriptContextError::MaxWitnessItemssExceeded { actual, limit } => write!(
113+
ScriptContextError::MaxWitnessItemsExceeded { actual, limit } => write!(
114114
f,
115115
"At least one spending path in the Miniscript fragment has {} more \
116116
witness items than limit {}.",
@@ -498,7 +498,7 @@ impl ScriptContext for Segwitv0 {
498498

499499
fn check_witness(witness: &[Vec<u8>]) -> Result<(), ScriptContextError> {
500500
if witness.len() > MAX_STANDARD_P2WSH_STACK_ITEMS {
501-
return Err(ScriptContextError::MaxWitnessItemssExceeded {
501+
return Err(ScriptContextError::MaxWitnessItemsExceeded {
502502
actual: witness.len(),
503503
limit: MAX_STANDARD_P2WSH_STACK_ITEMS,
504504
});
@@ -565,7 +565,7 @@ impl ScriptContext for Segwitv0 {
565565
// No possible satisfactions
566566
Err(_e) => Err(ScriptContextError::ImpossibleSatisfaction),
567567
Ok(max_witness_items) if max_witness_items > MAX_STANDARD_P2WSH_STACK_ITEMS => {
568-
Err(ScriptContextError::MaxWitnessItemssExceeded {
568+
Err(ScriptContextError::MaxWitnessItemsExceeded {
569569
actual: max_witness_items,
570570
limit: MAX_STANDARD_P2WSH_STACK_ITEMS,
571571
})
@@ -612,7 +612,7 @@ impl ScriptContext for Tap {
612612
fn check_witness(witness: &[Vec<u8>]) -> Result<(), ScriptContextError> {
613613
// Note that tapscript has a 1000 limit compared to 100 of segwitv0
614614
if witness.len() > MAX_STACK_SIZE {
615-
return Err(ScriptContextError::MaxWitnessItemssExceeded {
615+
return Err(ScriptContextError::MaxWitnessItemsExceeded {
616616
actual: witness.len(),
617617
limit: MAX_STACK_SIZE,
618618
});

0 commit comments

Comments
 (0)