HomePhabricator

Deprecate parts of validateaddress and introduce getaddressinfo

Description

Deprecate parts of validateaddress and introduce getaddressinfo

Summary:
This is the final backport of Core PR10583

  • Create getaddressinfo RPC and deprecate parts of validateaddress

Moves the parts of validateaddress which require the wallet into getaddressinfo
which is part of the wallet RPCs. Mark those parts of validateaddress which
require the wallet as deprecated.

Validateaddress will call getaddressinfo
for the data that both share for right now.

Moves IsMine functions to libbitcoin_common and then links libbitcoin_wallet
before libbitcoin_common in order to prevent linker errors since IsMine is no
longer used in libbitcoin_server.

  • scripted-diff: validateaddress to getaddressinfo in tests

Change all instances of validateaddress to getaddressinfo since it seems that
no test actually uses validateaddress for actually validating addresses.

-BEGIN VERIFY SCRIPT-
find ./test/functional -path '*py' -not -path ./test/functional/wallet_disable.py -not -path ./test/functional/rpc_deprecated.py -not -path ./test/functional/wallet_address_types.py -exec sed -i'' -e 's/validateaddress/getaddressinfo/g' {} \;
-END VERIFY SCRIPT-

Both commit are merged because they do not produce a working product independently.

Depends on D3139 and fixes broken master (w/o wallet) that was introduced in D3139

Test Plan:

make check
./test/functional/test_runner.py --extended

Reviewers: #bitcoin_abc, markblundeberg

Reviewed By: #bitcoin_abc, markblundeberg

Subscribers: markblundeberg

Differential Revision: https://reviews.bitcoinabc.org/D3147

Details

Provenance
Andrew Chow <achow101-github@achow101.com>Authored on Jun 13 2017, 01:53
deadalnixCommitted on Jun 3 2019, 19:09
deadalnixPushed on Jun 3 2019, 19:22
Reviewer
Restricted Project
Differential Revision
D3147: Deprecate parts of validateaddress and introduce getaddressinfo
Parents
rSTAGING71cc74fdad60: Merge #12198: rpc: Add deprecation error for `getinfo`
Branches
Unknown
Tags
Unknown