diff options
author | John Newbery <john@johnnewbery.com> | 2018-02-20 09:02:34 -0500 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2018-08-27 14:36:08 -0400 |
commit | df905e390e5f8b0201bda62c55227e9dc85194cd (patch) | |
tree | 7fe907160fd8e1c0b252fdf53be79b95ecd50b0f /src/rpc | |
parent | f180e81d5780805a28bcc71c2bb6b16076336c3c (diff) |
[rpc] Remove deprecated validateaddress usage.
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/misc.cpp | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 40418545c1..3668b0cd04 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -19,11 +19,6 @@ #include <timedata.h> #include <util.h> #include <utilstrencodings.h> -#ifdef ENABLE_WALLET -#include <wallet/rpcwallet.h> -#include <wallet/wallet.h> -#include <wallet/walletdb.h> -#endif #include <warnings.h> #include <stdint.h> @@ -67,29 +62,18 @@ static UniValue validateaddress(const JSONRPCRequest& request) ret.pushKV("isvalid", isValid); if (isValid) { + std::string currentAddress = EncodeDestination(dest); + ret.pushKV("address", currentAddress); -#ifdef ENABLE_WALLET - if (HasWallets() && IsDeprecatedRPCEnabled("validateaddress")) { - ret.pushKVs(getaddressinfo(request)); - } -#endif - if (ret["address"].isNull()) { - std::string currentAddress = EncodeDestination(dest); - ret.pushKV("address", currentAddress); - - CScript scriptPubKey = GetScriptForDestination(dest); - ret.pushKV("scriptPubKey", HexStr(scriptPubKey.begin(), scriptPubKey.end())); + CScript scriptPubKey = GetScriptForDestination(dest); + ret.pushKV("scriptPubKey", HexStr(scriptPubKey.begin(), scriptPubKey.end())); - UniValue detail = DescribeAddress(dest); - ret.pushKVs(detail); - } + UniValue detail = DescribeAddress(dest); + ret.pushKVs(detail); } return ret; } -// Needed even with !ENABLE_WALLET, to pass (ignored) pointers around -class CWallet; - static UniValue createmultisig(const JSONRPCRequest& request) { if (request.fHelp || request.params.size() < 2 || request.params.size() > 3) @@ -461,7 +445,7 @@ static const CRPCCommand commands[] = // --------------------- ------------------------ ----------------------- ---------- { "control", "getmemoryinfo", &getmemoryinfo, {"mode"} }, { "control", "logging", &logging, {"include", "exclude"}}, - { "util", "validateaddress", &validateaddress, {"address"} }, /* uses wallet if enabled */ + { "util", "validateaddress", &validateaddress, {"address"} }, { "util", "createmultisig", &createmultisig, {"nrequired","keys"} }, { "util", "verifymessage", &verifymessage, {"address","signature","message"} }, { "util", "signmessagewithprivkey", &signmessagewithprivkey, {"privkey","message"} }, |