Closed ottosch closed 2 years ago
With the "script" field I've basically just returned how it has been stored in the database without doing anything else to it.
Do you want the script field to show the full original script (including opcodes)? Like this:
41040766aa8462489f7957d5ae8dc499fa580f45f7f143d94eb7e461e2597416005db647f4a78c534057fc887667c5c332b287cc5ade652d319cc6942649f20dafdbac
(0x41
at the start is a indicates how many upcoming bytes, and 0xac
is OP_CHECKSIG).
Or do you just want it to show the uncompressed public key only?
040766aa8462489f7957d5ae8dc499fa580f45f7f143d94eb7e461e2597416005db647f4a78c534057fc887667c5c332b287cc5ade652d319cc6942649f20dafdb
I think it's fine to display the public key only (compressed or uncompressed, whichever is in the UTXO).
The tool now shows the full uncompressed public keys if that's how they appear in the locking script.
Thanks for bringing this up.
Hi @in3rsha,
I've noticed the program is not outputting the correct script for P2PK when the public key is uncompressed. Example: output of txid
050a20f455b8e98b7a374fd00c810b7c5102ef260b69bea89dd5792e55235fd8
has script050766aa8462489f7957d5ae8dc499fa580f45f7f143d94eb7e461e2597416005d
instead of040766aa8462489f7957d5ae8dc499fa580f45f7f143d94eb7e461e2597416005db647f4a78c534057fc887667c5c332b287cc5ade652d319cc6942649f20dafdb
.I see 2 issues: 1- The pubkey is only decompressed if
address
field is selected and flagp2pkaddresses
is used. I think it should also be decompressed ifscript
field is selected.2- Even if those conditions are met,
output["script"]
is not updated.Is this a bug? Can I fix it?