Skip to content

Commit 30bdcfc

Browse files
committed
Merge #9865: Change bitcoin address in RPC help message
83ac719 Change bitcoin address in RPC helpaddress to an invalid address, so people don't accidentally send coins there (like I did). (Marijn Stollenga) Tree-SHA512: ca1163466a149d567b97efbfcfa8fdfe2d474245b4dd5a1a92555b4e87f8e99df5fee4cd79ef1ce6a98db2337846af78f37c2e6b31d02008b11fa0e151ce6590
2 parents d75e8cb + 83ac719 commit 30bdcfc

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

src/rpc/misc.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,11 @@ UniValue verifymessage(const JSONRPCRequest& request)
347347
"\nUnlock the wallet for 30 seconds\n"
348348
+ HelpExampleCli("walletpassphrase", "\"mypassphrase\" 30") +
349349
"\nCreate the signature\n"
350-
+ HelpExampleCli("signmessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"my message\"") +
350+
+ HelpExampleCli("signmessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"my message\"") +
351351
"\nVerify the signature\n"
352-
+ HelpExampleCli("verifymessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"signature\" \"my message\"") +
352+
+ HelpExampleCli("verifymessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"signature\" \"my message\"") +
353353
"\nAs json rpc\n"
354-
+ HelpExampleRpc("verifymessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", \"signature\", \"my message\"")
354+
+ HelpExampleRpc("verifymessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\", \"signature\", \"my message\"")
355355
);
356356

357357
LOCK(cs_main);
@@ -400,7 +400,7 @@ UniValue signmessagewithprivkey(const JSONRPCRequest& request)
400400
"\nCreate the signature\n"
401401
+ HelpExampleCli("signmessagewithprivkey", "\"privkey\" \"my message\"") +
402402
"\nVerify the signature\n"
403-
+ HelpExampleCli("verifymessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"signature\" \"my message\"") +
403+
+ HelpExampleCli("verifymessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"signature\" \"my message\"") +
404404
"\nAs json rpc\n"
405405
+ HelpExampleRpc("signmessagewithprivkey", "\"privkey\", \"my message\"")
406406
);

src/wallet/rpcwallet.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ UniValue setaccount(const JSONRPCRequest& request)
236236
"1. \"address\" (string, required) The bitcoin address to be associated with an account.\n"
237237
"2. \"account\" (string, required) The account to assign the address to.\n"
238238
"\nExamples:\n"
239-
+ HelpExampleCli("setaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"tabby\"")
240-
+ HelpExampleRpc("setaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", \"tabby\"")
239+
+ HelpExampleCli("setaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"tabby\"")
240+
+ HelpExampleRpc("setaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\", \"tabby\"")
241241
);
242242

243243
LOCK2(cs_main, pwalletMain->cs_wallet);
@@ -283,8 +283,8 @@ UniValue getaccount(const JSONRPCRequest& request)
283283
"\nResult:\n"
284284
"\"accountname\" (string) the account address\n"
285285
"\nExamples:\n"
286-
+ HelpExampleCli("getaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"")
287-
+ HelpExampleRpc("getaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"")
286+
+ HelpExampleCli("getaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\"")
287+
+ HelpExampleRpc("getaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\"")
288288
);
289289

290290
LOCK2(cs_main, pwalletMain->cs_wallet);
@@ -503,11 +503,11 @@ UniValue signmessage(const JSONRPCRequest& request)
503503
"\nUnlock the wallet for 30 seconds\n"
504504
+ HelpExampleCli("walletpassphrase", "\"mypassphrase\" 30") +
505505
"\nCreate the signature\n"
506-
+ HelpExampleCli("signmessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"my message\"") +
506+
+ HelpExampleCli("signmessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"my message\"") +
507507
"\nVerify the signature\n"
508-
+ HelpExampleCli("verifymessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"signature\" \"my message\"") +
508+
+ HelpExampleCli("verifymessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"signature\" \"my message\"") +
509509
"\nAs json rpc\n"
510-
+ HelpExampleRpc("signmessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", \"my message\"")
510+
+ HelpExampleRpc("signmessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\", \"my message\"")
511511
);
512512

513513
LOCK2(cs_main, pwalletMain->cs_wallet);
@@ -556,13 +556,13 @@ UniValue getreceivedbyaddress(const JSONRPCRequest& request)
556556
"amount (numeric) The total amount in " + CURRENCY_UNIT + " received at this address.\n"
557557
"\nExamples:\n"
558558
"\nThe amount from transactions with at least 1 confirmation\n"
559-
+ HelpExampleCli("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"") +
559+
+ HelpExampleCli("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\"") +
560560
"\nThe amount including unconfirmed transactions, zero confirmations\n"
561-
+ HelpExampleCli("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" 0") +
561+
+ HelpExampleCli("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" 0") +
562562
"\nThe amount with at least 6 confirmation, very safe\n"
563-
+ HelpExampleCli("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" 6") +
563+
+ HelpExampleCli("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" 6") +
564564
"\nAs a json rpc call\n"
565-
+ HelpExampleRpc("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", 6")
565+
+ HelpExampleRpc("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\", 6")
566566
);
567567

568568
LOCK2(cs_main, pwalletMain->cs_wallet);
@@ -906,13 +906,13 @@ UniValue sendmany(const JSONRPCRequest& request)
906906
" the number of addresses.\n"
907907
"\nExamples:\n"
908908
"\nSend two amounts to two different addresses:\n"
909-
+ HelpExampleCli("sendmany", "\"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\"") +
909+
+ HelpExampleCli("sendmany", "\"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\"") +
910910
"\nSend two amounts to two different addresses setting the confirmation and comment:\n"
911-
+ HelpExampleCli("sendmany", "\"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 6 \"testing\"") +
911+
+ HelpExampleCli("sendmany", "\"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 6 \"testing\"") +
912912
"\nSend two amounts to two different addresses, subtract fee from amount:\n"
913-
+ HelpExampleCli("sendmany", "\"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 1 \"\" \"[\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\",\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\"]\"") +
913+
+ HelpExampleCli("sendmany", "\"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 1 \"\" \"[\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\\\",\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\"]\"") +
914914
"\nAs a json rpc call\n"
915-
+ HelpExampleRpc("sendmany", "\"\", \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\", 6, \"testing\"")
915+
+ HelpExampleRpc("sendmany", "\"\", \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\", 6, \"testing\"")
916916
);
917917

918918
LOCK2(cs_main, pwalletMain->cs_wallet);

0 commit comments

Comments
 (0)