Skip to content

Commit

Permalink
txscript: log tx on fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Roasbeef committed Nov 6, 2024
1 parent 5ccfe34 commit acc02b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion txscript/opcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/btcsuite/btcd/btcec/v2/ecdsa"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/davecgh/go-spew/spew"
)

// An opcode defines the information related to a txscript opcode. opfunc, if
Expand Down Expand Up @@ -2093,7 +2094,7 @@ func opcodeCheckSig(op *opcode, data []byte, vm *Engine) error {
case !valid && vm.taprootCtx != nil && len(fullSigBytes) != 0:
fallthrough
case !valid && vm.hasFlag(ScriptVerifyNullFail) && len(fullSigBytes) > 0:
str := "signature not empty on failed checksig"
str := fmt.Sprintf("signature not empty on failed checksig: %v", spew.Sdump(vm.tx))
return scriptError(ErrNullFail, str)
}

Expand Down

0 comments on commit acc02b1

Please sign in to comment.