Page MenuHomePhabricator

Deprecate parts of validateaddress and introduce getaddressinfo
ClosedPublic

Authored by deadalnix on May 28 2019, 23:43.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
getaddrinfo
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 6046
Build 10151: Bitcoin ABC Buildbot (legacy)
Build 10150: arc lint + arc unit

Event Timeline

markblundeberg added inline comments.
src/rpc/misc.cpp
45

"0.18"

Looks good, except just tweak the version number there (& this would make sense to land in same version as when we drop getinfo RPC).

This revision now requires changes to proceed.May 29 2019, 04:49

Rebase and update version number

This revision is now accepted and ready to land.Jun 3 2019, 19:05
This revision was landed with ongoing or failed builds.Jun 3 2019, 19:09
This revision was automatically updated to reflect the committed changes.