-
Notifications
You must be signed in to change notification settings - Fork 4.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
getConfirmedBlock: add encoding optional parameter #7756
getConfirmedBlock: add encoding optional parameter #7756
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7756 +/- ##
========================================
+ Coverage 81.8% 81.8% +<.1%
========================================
Files 241 241
Lines 50903 50988 +85
========================================
+ Hits 41652 41726 +74
- Misses 9251 9262 +11 |
Better! The instruction data for the JSON output is still yucky: base58 encoding this would be super too (not attached to base58 but it's the tool we have at hand). For the "binary" output, all those byte arrays could be base58ed too. wdyt? |
Base-58 encode all the things! You okay with this approach of lots of Rpc formatting-specific structs? |
I don't see a better alternative, so yep! I guess it helps us keep the RPC interface more stable, it won't just change if some other random part of the tree changes |
...at least this part of the RPC interface. Perhaps I'll consider whether other methods would benefit from being normalized this way. |
Once we start locking down the ABI (#7738), we'll see much less RPC churn as well |
37032a2
to
4d81d66
Compare
@mvines , fixed up with all the base 58 (updated examples above). Look okay? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, with json rpc api doc updates
4d81d66
to
c9c1ef8
Compare
automerge (cherry picked from commit a17d579)
Problem
Currently, the Transactions and Hashes returned by the
getConfirmedBlock
method are only nominally in JSON format... anything serialized with short_vec appears as an array of bytes, with the short_vec length as an artifact. This is not friendly for humans or machines.Summary of Changes
Before:
After: (edited after 265803d)
Json:
Binary: