aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2021-12-20 14:50:54 -0500
committerAndrew Chow <achow101-github@achow101.com>2021-12-20 14:51:39 -0500
commit887796a5ffcbafcd281b920f8d55fcb6e8347584 (patch)
tree11bf6497c8cb997e41940c82db7ef0d273aacd0c /src
parent3ac38058ce0e80a9f4276bfa82951decdb237e9a (diff)
parenta2a92317ad4ab88cfca234f68337a7cd37897f10 (diff)
Merge bitcoin/bitcoin#23341: RPC: Better safety with newkeypool command and wallet backups
a2a92317ad4ab88cfca234f68337a7cd37897f10 rpc: Add warning to user about newkeypool command (Samuel Dobson) Pull request description: This PR prevents `newkeypool` from being run on non-HD wallets, because this would require a new backup every time, so it isn't very safe. David Harding also suggested [here](https://github.com/bitcoin/bitcoin/pull/23093#issuecomment-945350003) that the RPC help text should include a warning to the users about the interaction between newkeypool. ACKs for top commit: achow101: ACK a2a92317ad4ab88cfca234f68337a7cd37897f10 Tree-SHA512: 0aa497900f1d179764bce13ffce0bb081ba2ca354492bf2e04b21d0212e960b3ed13a386fbf65602b6b50461f4056a0285752ef707d312da28e82449cd8ea048
Diffstat (limited to 'src')
-rw-r--r--src/wallet/rpc/addresses.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wallet/rpc/addresses.cpp b/src/wallet/rpc/addresses.cpp
index c7400cafe7..2db47bc855 100644
--- a/src/wallet/rpc/addresses.cpp
+++ b/src/wallet/rpc/addresses.cpp
@@ -359,7 +359,12 @@ RPCHelpMan keypoolrefill()
RPCHelpMan newkeypool()
{
return RPCHelpMan{"newkeypool",
- "\nEntirely clears and refills the keypool."+
+ "\nEntirely clears and refills the keypool.\n"
+ "WARNING: On non-HD wallets, this will require a new backup immediately, to include the new keys.\n"
+ "When restoring a backup of an HD wallet created before the newkeypool command is run, funds received to\n"
+ "new addresses may not appear automatically. They have not been lost, but the wallet may not find them.\n"
+ "This can be fixed by running the newkeypool command on the backup and then rescanning, so the wallet\n"
+ "re-generates the required keys." +
HELP_REQUIRING_PASSPHRASE,
{},
RPCResult{RPCResult::Type::NONE, "", ""},