From acc02b179029c441e6261f84386705298ed253c8 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 5 Nov 2024 16:09:09 -0800 Subject: [PATCH] txscript: log tx on fail --- txscript/opcode.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/txscript/opcode.go b/txscript/opcode.go index 770e5b470d..bce127096e 100644 --- a/txscript/opcode.go +++ b/txscript/opcode.go @@ -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 @@ -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) }