File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ bool VerifyWallets(interfaces::Chain& chain)
65
65
const fs::path path = fs::absolute (wallet_file, GetWalletDir ());
66
66
67
67
if (!wallet_paths.insert (path).second ) {
68
- chain.initError (strprintf (_ (" Error loading wallet %s. Duplicate -wallet filename specified ." ), wallet_file));
69
- return false ;
68
+ chain.initWarning (strprintf (_ (" Ignoring duplicate - wallet %s." ), wallet_file));
69
+ continue ;
70
70
}
71
71
72
72
DatabaseOptions options;
@@ -90,7 +90,11 @@ bool VerifyWallets(interfaces::Chain& chain)
90
90
bool LoadWallets (interfaces::Chain& chain)
91
91
{
92
92
try {
93
+ std::set<fs::path> wallet_paths;
93
94
for (const std::string& name : gArgs .GetArgs (" -wallet" )) {
95
+ if (!wallet_paths.insert (name).second ) {
96
+ continue ;
97
+ }
94
98
DatabaseOptions options;
95
99
DatabaseStatus status;
96
100
options.require_existing = true ;
Original file line number Diff line number Diff line change @@ -134,8 +134,8 @@ def wallet_file(name):
134
134
self .nodes [0 ].assert_start_raises_init_error (['-walletdir=wallets' ], 'Error: Specified -walletdir "wallets" is a relative path' , cwd = data_dir ())
135
135
self .nodes [0 ].assert_start_raises_init_error (['-walletdir=debug.log' ], 'Error: Specified -walletdir "debug.log" is not a directory' , cwd = data_dir ())
136
136
137
- # should not initialize if there are duplicate wallets
138
- self .nodes [ 0 ]. assert_start_raises_init_error ([ '-wallet=w1' , '-wallet=w1' ], 'Error: Error loading wallet w1. Duplicate -wallet filename specified .' )
137
+ self . start_node ( 0 , [ '-wallet=w1' , '-wallet=w1' ])
138
+ self .stop_node ( 0 , 'Warning: Ignoring duplicate -wallet w1 .' )
139
139
140
140
if not self .options .descriptors :
141
141
# Only BDB doesn't open duplicate wallet files. SQLite does not have this limitation. While this may be desired in the future, it is not necessary
You can’t perform that action at this time.
0 commit comments