bitcoin/bitcoin

decoderawtransaction should use hex or decimal, not both

gmart7t2 opened this issue · 2 comments

Is there an existing issue for this?

  • I have searched the existing issues

Current behaviour

I have two different op_return outputs, but they are shown identically in their "asm" decoding:

      "scriptPubKey": {
        "asm": "OP_RETURN 1431655765",
        "hex": "6a051431655765",
      }
      "scriptPubKey": {
        "asm": "OP_RETURN 1431655765",
        "hex": "6a0455555555",
      }

One shows the hex value. The other shows the decimal value. It would be better to be consistent and always use one or the other.

Expected behaviour

Different scripts should look different

Steps to reproduce

Create the two scripts I showed and examine them

Relevant log output

No response

How did you obtain Bitcoin Core

Compiled from source

What version of Bitcoin Core are you using?

v27.0

Operating system and version

Ubuntu deleterious donkey or whatever

Machine specifications

I don't think it really matters does it?

sipa commented

Duplicate of #27795 ?

Closing for now as duplicate