(WIP) Return headers as JSON array instead of concatenated string#109
(WIP) Return headers as JSON array instead of concatenated string#109JeremyRand wants to merge 9 commits intospesmilo:masterfrom
Conversation
|
Marked as WIP since the protocol docs haven't been updated yet. This change was discussed on IRC last year and there wasn't any objection to the concept; not sure if any concerns might have appeared since that discussion. @SomberNight Is this something we could possibly roll into the protocol bump in #90 to minimize the number of protocol bumps? |
|
(Also happy to squash this PR on request.) |
|
Not sure if the coverage decrease is a dealbreaker, let me know if it is. |
|
Ok, we can do this as part of protocol 1.5. I guess it adds around If you document the protocol change I can cherry pick such a commit to #90. |
Sounds good.
Yes, that's correct.
I think it's close to 3 bytes of asymptotic overhead per 160 bytes of hex (2 quotation marks and a comma; I'd expect no space character since presumably the JSON serializer is optimizing for compactness). But yes, close enough, I think the overhead is negligible.
Yes, I can do that. |
|
@SomberNight Added a commit to change the protocol docs accordingly. I didn't touch the changelog since that would conflict with your branch; let me know if you want me to write a changelog entry. |
Ah I forgot about quotes..
Hah. Don't assume, check! I did so now and whitespaces are there. |
|
Please also update the "Example Response" in the doc some lines below. |
@SomberNight Done. |
This PR makes the
blockchain.block.headersmethod return a JSON array of headers instead of a concatenated string, which improves semantic correctness.