Skip to content

Commit af7f379

Browse files
committed
txscript: align empty CHECKSIG pubkey validation with Core
The refreshed Bitcoin Core script reference tests cover cases where an empty CHECKSIG input must still fail pubkey encoding checks before the interpreter falls back to a generic false result.
1 parent 0235896 commit af7f379

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

txscript/opcode.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1993,6 +1993,10 @@ func opcodeCheckSig(op *opcode, data []byte, vm *Engine) error {
19931993
// This only applies if tapscript verification isn't active, as this
19941994
// check is done within the sighash itself.
19951995
if vm.taprootCtx == nil && len(fullSigBytes) < 1 {
1996+
if err := vm.checkPubKeyEncoding(pkBytes); err != nil {
1997+
return err
1998+
}
1999+
19962000
vm.dstack.PushBool(false)
19972001
return nil
19982002
}

0 commit comments

Comments
 (0)