wallet: remove unused warnings parameter from CreateFromDump

`CreateFromDump` never writes to the vector, so the loop that prints it
in wallet-tool cannot produce output. `tool_wallet.py` already asserts
empty output for `createfromdump`.

The only `warnings.push_back()` was removed in 7a41c939f0 ("wallet:
Remove -format and bdb from wallet tool's createfromdump").
This commit is contained in:
jeanpablo
2026-08-30 15:39:01 +01:00
parent 2f6aa41d3d
commit bbed824a64
3 changed files with 3 additions and 8 deletions

View File

@@ -119,7 +119,7 @@ static void WalletToolReleaseWallet(CWallet* wallet)
delete wallet;
}
bool CreateFromDump(const ArgsManager& args, const std::string& name, const fs::path& wallet_path, bilingual_str& error, std::vector<bilingual_str>& warnings)
bool CreateFromDump(const ArgsManager& args, const std::string& name, const fs::path& wallet_path, bilingual_str& error)
{
if (name.empty()) {
tfm::format(std::cerr, "Wallet name cannot be empty\n");

View File

@@ -8,7 +8,6 @@
#include <util/fs.h>
#include <string>
#include <vector>
struct bilingual_str;
class ArgsManager;
@@ -17,7 +16,7 @@ namespace wallet {
class WalletDatabase;
bool DumpWallet(const ArgsManager& args, WalletDatabase& db, bilingual_str& error);
bool CreateFromDump(const ArgsManager& args, const std::string& name, const fs::path& wallet_path, bilingual_str& error, std::vector<bilingual_str>& warnings);
bool CreateFromDump(const ArgsManager& args, const std::string& name, const fs::path& wallet_path, bilingual_str& error);
} // namespace wallet
#endif // BITCOIN_WALLET_DUMP_H

View File

@@ -162,11 +162,7 @@ bool ExecuteWalletToolFunc(const ArgsManager& args, const std::string& command)
return ret;
} else if (command == "createfromdump") {
bilingual_str error;
std::vector<bilingual_str> warnings;
bool ret = CreateFromDump(args, name, path, error, warnings);
for (const auto& warning : warnings) {
tfm::format(std::cout, "%s\n", warning.original);
}
bool ret = CreateFromDump(args, name, path, error);
if (!ret && !error.empty()) {
tfm::format(std::cerr, "%s\n", error.original);
}