-
Notifications
You must be signed in to change notification settings - Fork 101
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
[Chore] Backport GetBlockVerbosity Fixes & Add getbalances RPC client command #389
Conversation
It is important to note we had a previous PR that had this functionality but it never landed in |
updated docs for getblock-verbosity fixes
Added commit for
|
I don't think that ABC or BCHN have actually picked up the getbalances call... |
Actually, I stand corrected, BCHN doesn't have it, but ABC does as of 0.21.9! |
ABC enabled getbalances as of 0.21.9 :) |
Guys please keep the Changing the verbosity flag to int and throwing an error if it’s bool introduces a needless bchd specific quirk and/or a special case code path in codebases (such as mine) that try to support multiple bitcoin node implementations... for bchd now I have to add more code and spend time dealing with quirks of new bchd vs old bchd vs whatever .. this is a problem for all existing systems. It also risks introducing a possible regression for all the code out there sending bools. Please make verbosity remain bool to avoid this. |
Also I want to point out that for getblock — ABC accepts both int and bool there. |
Actually ABC/BCHN can accept an int or a bool, and if you use a bool it can't actually use the highest verbosity level. It accepts 0, 1, 2 as ints, or a bool. We can make sure a bool still works before this PR lands. Technically any consumer still sending a bool is sending the deprecated format, and can't even take full advantage of the different output modes. |
Here are the current docs for ABC and BCHN.
|
@JettScythe want to try and make sure we can also support a boolean value? That would make sure we were completely compatible before this lands. |
@zquestz thanks for clarifying everything. Yeah well the docs make no claim that boolean is deprecated (EDIT: Oh I see -- you consider that deprecated; got it). There is the matter of existing code that is using bchd (that is now sending bool because int is rejected) that will insta-break if you take only int now.. and then they have the problem of having to probe bchd version to figure out which bchd they are talking to. (I'm talking about myself here and my own pain :D ). Thanks man I don't see the harm in supporting both. I'm super glad you are doing that. 👍
Hmm. As Obi Wan Kenobi famously said: "That is true... from a certain point of view" |
@cculianu the latest commits should make sure boolean values continue to work as expected in the API.
Please test and make sure things work as you expect. =) Example working bchctl commands.
Invalid bchctl commands.
Working curl commands.
|
… into getblock-verbosity
Refactor GetBlockVerboseTx to reflect correct getblock RPC call parameters
btcsuite/btcd#1529
Change getblock default verbosity to 1
btcsuite/btcd#1560
rpcclient: send legacy GetBlock request for backwards compatibility
btcsuite/btcd#1577