From f4a6449ad3b90d0c830bf2895b83ced8d5fb91e9 Mon Sep 17 00:00:00 2001 From: "Owain G. Ainsworth" Date: Thu, 7 Nov 2013 18:22:48 +0000 Subject: [PATCH] Actually just fail the opcode, not returning an error. should fix some crazy script on testnet. --- opcode.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opcode.go b/opcode.go index 80d83aee..f85bc999 100644 --- a/opcode.go +++ b/opcode.go @@ -11,7 +11,6 @@ import ( "crypto/sha1" "crypto/sha256" "encoding/binary" - "errors" "fmt" "github.com/conformal/btcec" "github.com/conformal/btcwire" @@ -1667,7 +1666,8 @@ func opcodeCheckSig(op *parsedOpcode, s *Script) error { // at least 1 byte for the below. btcec will check full length upon // parsing the signature. if len(sigStr) < 1 { - return errors.New("Short signature") + s.dstack.PushBool(false) + return nil } // Trim off hashtype from the signature string.