-
Notifications
You must be signed in to change notification settings - Fork 37.8k
doc: getaddressinfo[isscript] is optional #30457
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
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
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.
code LGTM fa63ecc but I think the test needs to be fixed
@@ -534,7 +534,7 @@ RPCHelpMan getaddressinfo() | |||
{RPCResult::Type::BOOL, "solvable", "If we know how to spend coins sent to this address, ignoring the possible lack of private keys."}, | |||
{RPCResult::Type::STR, "desc", /*optional=*/true, "A descriptor for spending coins sent to this address (only when solvable)."}, | |||
{RPCResult::Type::STR, "parent_desc", /*optional=*/true, "The descriptor used to derive this address if this is a descriptor wallet"}, | |||
{RPCResult::Type::BOOL, "isscript", "If the key is a script."}, | |||
{RPCResult::Type::BOOL, "isscript", /*optional=*/true, "If the key is a script."}, |
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.
unrelated: that is quite the field description 😳 Time to start thinking about deprecating isscript
and iswitness
, perhaps?
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.
yeah I was having a real hard time understanding what a lot of these fields actually mean...
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.
I think it means "some kind of pay to script hash", that is SH or WSH.
I guess it would be clearer to just return an enum as string, rather than a collection of boolean fields.
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.
Approach ACK
Thanks for increasing clarity in RPC.
Looks like there's a missing assert
in test_getaddressinfo()
.
Left a nit.
@@ -12,6 +12,7 @@ | |||
) | |||
|
|||
BECH32_VALID = 'bcrt1qtmp74ayg7p24uslctssvjm06q5phz4yrxucgnv' | |||
BECH32_VALID_UNKNOWN_WITNESS = 'bcrt1p424qxxyd0r' |
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.
Maybe it's worth adding a line for segwit v0 as well? (e.g. witness program not 20 or 32 bytes long)?
also
nit: might increase clarity
- BECH32_VALID_UNKNOWN_WITNESS = 'bcrt1p424qxxyd0r'
+ BECH32_VALID_UNKNOWN_WITNESS_PROG = 'bcrt1p424qxxyd0r'
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.
Left the nit for now.
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.
ACK fa6390d
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.
ACK fa6390d
Github-Pull: bitcoin#30457 Rebased-From: fa6390d
isscript
is unknown for unknown witness versions, so it should be marked optional in the docsFixes #30456