-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(WIP) Return headers as JSON array instead of concatenated string #109
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.headers
method return a JSON array of headers instead of a concatenated string, which improves semantic correctness.