This PR is a continuation of the work in #12892.
Main motivations:
- There is currently no test coverage for the getaddressinfo
labels
response. Coverage here is a prerequisite before deprecating thelabel
response or adding multiple labels per address. bitcoin-cli help getaddressinfo
returns a few content errors, difficult-to-read formatting, and no explanation why it returns bothlabel
andlabels
and how they relate, which can be confusing for application developers.
Changes by order of commits:
- improve/fix getaddressinfo RPCHelpman layout formatting
- improve/fix getaddressinfo RPCHelpman content
- clarify the
label
andlabels
fields in getaddressinfo RPCHelpman - update getaddressinfo RPCExamples addresses to bech32
- add getaddressinfo code docs
- add a
listlabels
test assertion in wallet_labels.py - add missing getaddressinfo
labels
test coverage and improve the existinglabel
tests
Here are gists of the CLI help output:
bitcoin-cli help getaddressinfo
before this PR
bitcoin-cli help getaddressinfo
after this PR
It seems we ought to begin a deprecation process for the getaddressinfo label
field? If yes, I have a follow-up ready. –> EDIT: Deprecation follow-ups #17578 and #17585 now build on this PR.