-
Notifications
You must be signed in to change notification settings - Fork 36.5k
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
[REST] JSON support for /rest/headers #5486
Conversation
e7cf866
to
105f78a
Compare
Needs rebase |
105f78a
to
fcf449b
Compare
Rebased. |
Code appears correct... I just wonder who would use JSON header queries. |
@jgarzik couldn't we ask the same for json blocks? I just think we should have consistent output support over all rest calls. |
Well at least blocks contain transactions. None of the information in headers is that useful in itself, and don't you get a similar view with |
IMO JSON output support is for users who don't like to deserialize data. |
Yes, I understand the purpose but I'm with @jgarzik in wondering why anyone would use this, as the header has very little informational value outside its (hashable, unmalleable) binary representation. But I'm not strongly against it either it's not a lot of code. And there's something to be said for consistency. |
utACK |
ACK (I was about to add the missing /rest/headers documentation ;-) |
Yes. This PR also includes the missing docs for already merged rest headers call (it's a separate commit). |
After #6247 this can use the existing BlockHeaderToJSON (see my comment about overlap there) |
4174aa6
to
7c2c6d7
Compare
Rebased and make use of the |
7c2c6d7
to
0e01596
Compare
0e01596
to
c45c7ea
Compare
ACK |
c45c7ea [REST] add JSON support for /rest/headers/ (Jonas Schnelli)
Bitcoin 0.12 RPC PRs 1 Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6266 - bitcoin/bitcoin#6257 - bitcoin/bitcoin#6271 - bitcoin/bitcoin#6158 - bitcoin/bitcoin#6307 - bitcoin/bitcoin#6290 - bitcoin/bitcoin#6262 - bitcoin/bitcoin#6088 - bitcoin/bitcoin#6339 - bitcoin/bitcoin#6299 (partial, remainder in #2099) - bitcoin/bitcoin#6350 - bitcoin/bitcoin#6247 - bitcoin/bitcoin#6362 - bitcoin/bitcoin#5486 - bitcoin/bitcoin#6417 - bitcoin/bitcoin#6398 (partial, remainder was included in #1950) - bitcoin/bitcoin#6444 - bitcoin/bitcoin#6456 (partial, remainder was included in #2082) - bitcoin/bitcoin#6380 - bitcoin/bitcoin#6970 Part of #2074.
also includes REST documentation update for /rest/headers