-
Notifications
You must be signed in to change notification settings - Fork 123
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
rpc: add ChainHash message with both bytes and string representations #1087
Conversation
Pull Request Test Coverage Report for Build 10403975668Details
💛 - Coveralls |
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.
While I like the idea, see my inline comment for why we might not want to do it.
But happy to be overruled...
This commit introduces the `ChainHash` RPC message, which contains two fields: - A raw byte representation of the hash, ideal for direct use in Go RPC calls. - A byte-reversed hexadecimal string representation of the hash, convenient for users who need to copy and paste the value, such as when passing it as a command-line argument.
8961804
to
139669b
Compare
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 🎉
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 - wondering if we should swap this in in other relevant spots / RPC messages before the next major release?
Non-blocking.
I think we don't want to change any APIs that have already been in a released version. So the field changed in this PR is the only one we can change without potentially breaking anyone's application. But we should keep this in mind for future fields. |
This is a follow up PR for this review comment: #1074 (comment)
This commit introduces the
ChainHash
RPC message, which contains two fields: