Skip to content

Conversation

@solatis
Copy link

@solatis solatis commented Apr 9, 2015

Bitcoin's rpc command decoderawtransaction hasn't sent a hex field for a very long time; as far as my code archaeology allowed, I wasn't able to find any hex output field for decoderawtransaction since at least version 0.7: https://github.com/bitcoin/bitcoin/blob/0.7.2/src/rpcrawtransaction.cpp#L47

This pull request makes the parsing of the hex field optional, and hard-codes the storage of the raw transaction in this field. I would personally opt for removing the decRaw field entirely, since I cannot see it being used at all (since the parsing must have been failing at least since bitcoin 0.7).

solatis added 4 commits April 9, 2015 15:56
Instead of adding the JSON that was unparsable to the error message, add
the actual error generated by Aeson so you can inspect why the JSON was
unparsable.
The bitcoind RPC interface doesn't send a "hex" field at least since
version 0.7. This patch makes the parsing of the "hex" field optional,
and in either case, always stores the raw transaction object; this is to
remain API compatible. In long term, we might want to get rid of the
decRaw field of DecodedRawTransaction since it is redundant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant