From aa722c228c80aabb1e2e3a7a0f0fe5f4e348c444 Mon Sep 17 00:00:00 2001 From: ChrisCho-H Date: Mon, 25 Nov 2024 15:11:28 +0900 Subject: [PATCH] feat: remove inefficient if check on match lex --- src/miniscript/lex.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/miniscript/lex.rs b/src/miniscript/lex.rs index 30dab98e9..64e6bfe00 100644 --- a/src/miniscript/lex.rs +++ b/src/miniscript/lex.rs @@ -138,10 +138,10 @@ pub fn lex(script: &'_ script::Script) -> Result>, Error> { ret.push(Token::CheckMultiSig); ret.push(Token::Verify); } - script::Instruction::Op(op) if op == opcodes::all::OP_CSV => { + script::Instruction::Op(opcodes::all::OP_CSV) => { ret.push(Token::CheckSequenceVerify); } - script::Instruction::Op(op) if op == opcodes::all::OP_CLTV => { + script::Instruction::Op(opcodes::all::OP_CLTV) => { ret.push(Token::CheckLockTimeVerify); } script::Instruction::Op(opcodes::all::OP_FROMALTSTACK) => {