wallettool: Disallow creating new unnamed wallets

This commit is contained in:
Ava Chow
2026-01-06 15:43:29 -08:00
parent 5875a9c502
commit 75b704df9d
3 changed files with 21 additions and 7 deletions

View File

@@ -121,6 +121,11 @@ static void WalletToolReleaseWallet(CWallet* wallet)
bool CreateFromDump(const ArgsManager& args, const std::string& name, const fs::path& wallet_path, bilingual_str& error, std::vector<bilingual_str>& warnings)
{
if (name.empty()) {
tfm::format(std::cerr, "Wallet name cannot be empty\n");
return false;
}
// Get the dumpfile
std::string dump_filename = args.GetArg("-dumpfile", "");
if (dump_filename.empty()) {