This PR is a continuation of the work in #12892.
Main motivations:
- There is currently no test coverage for the getaddressinfo
labelsresponse. Coverage here is a prerequisite before deprecating thelabelresponse or adding multiple labels per address. bitcoin-cli help getaddressinforeturns a few content errors, difficult-to-read formatting, and no explanation why it returns bothlabelandlabelsand 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
labelandlabelsfields in getaddressinfo RPCHelpman - update getaddressinfo RPCExamples addresses to bech32
- add getaddressinfo code docs
- add a
listlabelstest assertion in wallet_labels.py - add missing getaddressinfo
labelstest coverage and improve the existinglabeltests
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.