From 80d275a5b6cb9b9b8d9ae85a346b85f1bcc4208d Mon Sep 17 00:00:00 2001 From: Charlie Chen Date: Thu, 14 Nov 2024 19:52:38 -0600 Subject: [PATCH] append opcode decoding err, if any, to log print --- zetaclient/chains/bitcoin/tx_script.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zetaclient/chains/bitcoin/tx_script.go b/zetaclient/chains/bitcoin/tx_script.go index 95dde7992e..e15268a868 100644 --- a/zetaclient/chains/bitcoin/tx_script.go +++ b/zetaclient/chains/bitcoin/tx_script.go @@ -337,11 +337,11 @@ func decodeInscriptionPayload(t *txscript.ScriptTokenizer) ([]byte, error) { // OP_PUSHBYTES_32 <32 bytes> OP_CHECKSIG func checkInscriptionEnvelope(t *txscript.ScriptTokenizer) error { if !t.Next() || t.Opcode() != txscript.OP_DATA_32 { - return fmt.Errorf("public key not found") + return fmt.Errorf("public key not found: %v", t.Err()) } if !t.Next() || t.Opcode() != txscript.OP_CHECKSIG { - return fmt.Errorf("OP_CHECKSIG not found") + return fmt.Errorf("OP_CHECKSIG not found: %v", t.Err()) } return nil