From 7f1475c7119e8c72bce39a63386a6ca859066b80 Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Tue, 11 Feb 2020 23:03:19 +0100 Subject: rpc: update validateaddress RPCExamples to bech32 also contains the following changes: - rpc: factor out example bech32 address for RPCExamples - doc: update developer notes wrt RPCExamples addresses (mention the EXAMPLE_ADDRESS constant as an example for an invalid bech32 address suitable for RPCExamples help documentation) --- src/wallet/rpcwallet.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/wallet') diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index dc9124e1a3..63253f2cc8 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3737,8 +3737,6 @@ UniValue getaddressinfo(const JSONRPCRequest& request) return NullUniValue; } - const std::string example_address = "\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\""; - RPCHelpMan{"getaddressinfo", "\nReturn information about the given bitcoin address.\n" "Some of the information will only be present if the address is in the active wallet.\n", @@ -3791,8 +3789,8 @@ UniValue getaddressinfo(const JSONRPCRequest& request) "}\n" }, RPCExamples{ - HelpExampleCli("getaddressinfo", example_address) + - HelpExampleRpc("getaddressinfo", example_address) + HelpExampleCli("getaddressinfo", EXAMPLE_ADDRESS) + + HelpExampleRpc("getaddressinfo", EXAMPLE_ADDRESS) }, }.Check(request); -- cgit v1.2.3