diff options
author | Yusuf Sahin HAMZA <yusufsahinhamza@gmail.com> | 2020-02-25 19:12:04 +0300 |
---|---|---|
committer | Yusuf Sahin HAMZA <yusufsahinhamza@gmail.com> | 2020-03-01 18:13:35 +0300 |
commit | 3e32499909ca8127baaa9b40ad113b25ee151bbd (patch) | |
tree | 562e16d96a54c0dca6b5299cb67807a431fdbfbd /src/rpc | |
parent | 31c0006a6cd5ecbabd119eaf9dae6978aa54f150 (diff) |
Change example addresses to bech32
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/misc.cpp | 4 | ||||
-rw-r--r-- | src/rpc/util.cpp | 2 | ||||
-rw-r--r-- | src/rpc/util.h | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 4279756f4d..8dc4c0b65f 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -44,8 +44,8 @@ static UniValue validateaddress(const JSONRPCRequest& request) "}\n" }, RPCExamples{ - HelpExampleCli("validateaddress", EXAMPLE_ADDRESS) + - HelpExampleRpc("validateaddress", EXAMPLE_ADDRESS) + HelpExampleCli("validateaddress", "\"" + EXAMPLE_ADDRESS[0] + "\"") + + HelpExampleRpc("validateaddress", "\"" + EXAMPLE_ADDRESS[0] + "\"") }, }.Check(request); diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp index 7cefb2db96..733736eea6 100644 --- a/src/rpc/util.cpp +++ b/src/rpc/util.cpp @@ -14,7 +14,7 @@ #include <tuple> const std::string UNIX_EPOCH_TIME = "UNIX epoch time"; -const std::string EXAMPLE_ADDRESS = "\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\""; +const std::string EXAMPLE_ADDRESS[2] = {"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl", "bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3"}; void RPCTypeCheck(const UniValue& params, const std::list<UniValueType>& typesExpected, diff --git a/src/rpc/util.h b/src/rpc/util.h index f5edf69713..b43a9a4836 100644 --- a/src/rpc/util.h +++ b/src/rpc/util.h @@ -29,10 +29,10 @@ extern const std::string UNIX_EPOCH_TIME; /** - * Example bech32 address used in multiple RPCExamples. The address is intentionally + * Example bech32 addresses for the RPCExamples help documentation. They are intentionally * invalid to prevent accidental transactions by users. */ -extern const std::string EXAMPLE_ADDRESS; +extern const std::string EXAMPLE_ADDRESS[2]; class FillableSigningProvider; class CPubKey; |