Skip to content

Commit ca09415

Browse files
furszyjonatack
andcommitted
rpc, doc: encryptwallet, mention HD seed rotation and new backup
Better to notify users about the HD seed rotation and the new backup requirement before executing the encryption process. Ensuring they are prepared to update previous backups and securely safeguard the updated wallet file. Co-authored-by: jonatack <jon@atack.com>
1 parent 498994b commit ca09415

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/wallet/rpc/encrypt.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,11 @@ RPCHelpMan encryptwallet()
220220
"After this, any calls that interact with private keys such as sending or signing \n"
221221
"will require the passphrase to be set prior the making these calls.\n"
222222
"Use the walletpassphrase call for this, and then walletlock call.\n"
223-
"If the wallet is already encrypted, use the walletpassphrasechange call.\n",
223+
"If the wallet is already encrypted, use the walletpassphrasechange call.\n"
224+
"** IMPORTANT **\n"
225+
"For security reasons, the encryption process will generate a new HD seed, resulting\n"
226+
"in the creation of a fresh set of active descriptors. Therefore, it is crucial to\n"
227+
"securely back up the newly generated wallet file using the backupwallet RPC.\n",
224228
{
225229
{"passphrase", RPCArg::Type::STR, RPCArg::Optional::NO, "The pass phrase to encrypt the wallet with. It must be at least 1 character, but should be long."},
226230
},
@@ -268,7 +272,7 @@ RPCHelpMan encryptwallet()
268272
throw JSONRPCError(RPC_WALLET_ENCRYPTION_FAILED, "Error: Failed to encrypt the wallet.");
269273
}
270274

271-
return "wallet encrypted; The keypool has been flushed and a new HD seed was generated (if you are using HD). You need to make a new backup.";
275+
return "wallet encrypted; The keypool has been flushed and a new HD seed was generated. You need to make a new backup with the backupwallet RPC.";
272276
},
273277
};
274278
}

0 commit comments

Comments
 (0)