This PR builds on #17283 (now merged) and is followed by #17585.
It modifies the value returned by rpc getaddressinfo labels to an array of label name strings and deprecates the previous behavior of returning an array of JSON hash structures containing label name and address purpose key/value pairs.
before
0 "labels": [
1 {
2 "name": "DOUBLE SPEND",
3 "purpose": "receive"
4 }
after
0 "labels": [
1 "DOUBLE SPEND"
2 ]
The deprecated behavior can be re-enabled by starting bitcoind with -deprecatedrpc=labelspurpose.
For context, see:
- #17283 (comment)
- http://www.erisian.com.au/bitcoin-core-dev/log-2019-12-13.html#l-425 (lines 425-427)
- http://www.erisian.com.au/bitcoin-core-dev/log-2019-11-22.html#l-622
Reviewers: This PR may be tested manually by building, then running bitcoind with and without the -deprecatedrpc=labelspurpose flag while verifying the rpc getaddressinfo help text and labels output.
Next steps: deprecate the rpc getaddressinfo label field (EDIT: done in #17585) and add support for multiple labels per address. This PR will unblock those.