diff --git a/txscript/engine.go b/txscript/engine.go index bf738a6c..48ec9483 100644 --- a/txscript/engine.go +++ b/txscript/engine.go @@ -296,7 +296,7 @@ func (vm *Engine) executeOpcode(op *opcode, data []byte) error { } // Ensure all executed data push opcodes use the minimal encoding. - if vm.isBranchExecuting() && op.value >= 0 && op.value <= OP_PUSHDATA4 { + if vm.isBranchExecuting() && op.value <= OP_PUSHDATA4 { if err := checkMinimalDataPush(op, data); err != nil { return err } diff --git a/txscript/sigcache.go b/txscript/sigcache.go index 1d38a340..d0008c9e 100644 --- a/txscript/sigcache.go +++ b/txscript/sigcache.go @@ -79,7 +79,7 @@ func (s *SigCache) Add(sigHash chainhash.Hash, sig chainec.Signature, pubKey cha s.Lock() defer s.Unlock() - if s.maxEntries <= 0 { + if s.maxEntries == 0 { return }