Skip to content

Commit

Permalink
feat: remove inefficient if check on match lex
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisCho-H committed Nov 25, 2024
1 parent 460400d commit aa722c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/miniscript/lex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ pub fn lex(script: &'_ script::Script) -> Result<Vec<Token<'_>>, 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) => {
Expand Down

0 comments on commit aa722c2

Please sign in to comment.