Skip to content

Commit

Permalink
append opcode decoding err, if any, to log print
Browse files Browse the repository at this point in the history
  • Loading branch information
ws4charlie committed Nov 15, 2024
1 parent 46a6cdc commit 80d275a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zetaclient/chains/bitcoin/tx_script.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,11 @@ func decodeInscriptionPayload(t *txscript.ScriptTokenizer) ([]byte, error) {
// OP_PUSHBYTES_32 <32 bytes> OP_CHECKSIG <Content>
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
Expand Down

0 comments on commit 80d275a

Please sign in to comment.