Fixes bug where decodeRawTransaction always failed #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bitcoin's rpc command
decoderawtransaction
hasn't sent ahex
field for a very long time; as far as my code archaeology allowed, I wasn't able to find anyhex
output field for decoderawtransaction since at least version 0.7: https://github.com/bitcoin/bitcoin/blob/0.7.2/src/rpcrawtransaction.cpp#L47This 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).