Skip to content

doc: getaddressinfo[isscript] is optional - #30457

Merged
fanquake merged 1 commit into
bitcoin:masterfrom
maflcko:2407-doc
Jul 17, 2024
Merged

fanquake merged 1 commit into
bitcoin:masterfrom
maflcko:2407-doc

Conversation

@maflcko

@maflcko maflcko commented Jul 16, 2024 •

Copy link
Copy Markdown
Member

isscript is unknown for unknown witness versions, so it should be marked optional in the docs

Fixes #30456

@DrahtBot

DrahtBot commented Jul 16, 2024 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK stickies-v, tdb3

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@DrahtBot DrahtBot added the Docs label Jul 16, 2024

@stickies-v stickies-v left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM fa63ecc72045ffa771448941e1fe066f7421f640 but I think the test needs to be fixed

Comment thread src/wallet/rpc/addresses.cpp Outdated

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Member

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...

Copy link
Copy Markdown
Member Author

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.

@tdb3 tdb3 left a comment

Copy link
Copy Markdown
Contributor

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.

@tdb3 tdb3 Jul 17, 2024 •

Copy link
Copy Markdown
Contributor

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'

Copy link
Copy Markdown
Member Author

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.

@stickies-v stickies-v left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa6390d

@DrahtBot
DrahtBot requested a review from tdb3 July 17, 2024 10:19

@tdb3 tdb3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa6390d

@fanquake
fanquake merged commit 3799224 into bitcoin:master Jul 17, 2024
@maflcko
maflcko deleted the 2407-doc branch July 17, 2024 13:20
luke-jr pushed a commit to bitcoinknots/bitcoin that referenced this pull request Aug 1, 2024
@bitcoin bitcoin locked and limited conversation to collaborators Jul 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

getaddressinfo: complains missing isscript when called on unknown witness version

6 participants