mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-03 20:35:17 +02:00
Merge #18208: rpc: Change RPCExamples to bech32
3e32499909Change example addresses to bech32 (Yusuf Sahin HAMZA) Pull request description: This is a follow-up PR to #18197 that fixes RPCExamples. Fixes #18185. ACKs for top commit: MarcoFalke: ACK3e32499909jonatack: ACK3e32499Tree-SHA512: c7a6410ef8b6e169016c2c5eac3e6b9501caabd0e8a0871ec31e56bfc44589f056d3f5cb55b5a13bba36f6c15136c2352f883e30e4dcc0997ffd36b27f9173b9
This commit is contained in:
@@ -45,8 +45,8 @@ static UniValue validateaddress(const JSONRPCRequest& request)
|
||||
}
|
||||
},
|
||||
RPCExamples{
|
||||
HelpExampleCli("validateaddress", EXAMPLE_ADDRESS) +
|
||||
HelpExampleRpc("validateaddress", EXAMPLE_ADDRESS)
|
||||
HelpExampleCli("validateaddress", "\"" + EXAMPLE_ADDRESS[0] + "\"") +
|
||||
HelpExampleRpc("validateaddress", "\"" + EXAMPLE_ADDRESS[0] + "\"")
|
||||
},
|
||||
}.Check(request);
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user