mirror of
https://github.com/btcsuite/btcd.git
synced 2026-08-13 12:32:51 +02:00
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.
This commit is contained in:
parent
818c841ce0
commit
0fc16396bf
1 changed files with 4 additions and 0 deletions
|
|
@ -1996,6 +1996,10 @@ func opcodeCheckSig(op *opcode, data []byte, vm *Engine) error {
|
|||
// This only applies if tapscript verification isn't active, as this
|
||||
// check is done within the sighash itself.
|
||||
if vm.taprootCtx == nil && len(fullSigBytes) < 1 {
|
||||
if err := vm.checkPubKeyEncoding(pkBytes); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
vm.dstack.PushBool(false)
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue