mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-19 20:20:00 +01:00
Ignoring (but warn) on duplicate -wallet parameters
This commit is contained in:
@@ -65,8 +65,8 @@ bool VerifyWallets(interfaces::Chain& chain)
|
||||
const fs::path path = fs::absolute(wallet_file, GetWalletDir());
|
||||
|
||||
if (!wallet_paths.insert(path).second) {
|
||||
chain.initError(strprintf(_("Error loading wallet %s. Duplicate -wallet filename specified."), wallet_file));
|
||||
return false;
|
||||
chain.initWarning(strprintf(_("Ignoring duplicate -wallet %s."), wallet_file));
|
||||
continue;
|
||||
}
|
||||
|
||||
DatabaseOptions options;
|
||||
@@ -90,7 +90,11 @@ bool VerifyWallets(interfaces::Chain& chain)
|
||||
bool LoadWallets(interfaces::Chain& chain)
|
||||
{
|
||||
try {
|
||||
std::set<fs::path> wallet_paths;
|
||||
for (const std::string& name : gArgs.GetArgs("-wallet")) {
|
||||
if (!wallet_paths.insert(name).second) {
|
||||
continue;
|
||||
}
|
||||
DatabaseOptions options;
|
||||
DatabaseStatus status;
|
||||
options.require_existing = true;
|
||||
|
||||
Reference in New Issue
Block a user