Skip to content

Commit 5f9c0b6

Browse files
MarcoFalkeachow101
authored andcommitted
wallet: Remove -upgradewallet from dummywallet
1 parent a314271 commit 5f9c0b6

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/dummywallet.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ void DummyWalletInit::AddWalletOptions(ArgsManager& argsman) const
4040
"-salvagewallet",
4141
"-spendzeroconfchange",
4242
"-txconfirmtarget=<n>",
43-
"-upgradewallet",
4443
"-wallet=<path>",
4544
"-walletbroadcast",
4645
"-walletdir=<dir>",

src/wallet/wallet.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4100,8 +4100,7 @@ const CAddressBookData* CWallet::FindAddressBookEntry(const CTxDestination& dest
41004100
bool CWallet::UpgradeWallet(int version, bilingual_str& error, std::vector<bilingual_str>& warnings)
41014101
{
41024102
int prev_version = GetVersion();
4103-
if (version == 0) // the -upgradewallet without argument case
4104-
{
4103+
if (version == 0) {
41054104
WalletLogPrintf("Performing wallet upgrade to %i\n", FEATURE_LATEST);
41064105
version = FEATURE_LATEST;
41074106
} else {

test/functional/wallet_multiwallet.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ def wallet_file(name):
139139
open(not_a_dir, 'a', encoding="utf8").close()
140140
self.nodes[0].assert_start_raises_init_error(['-walletdir=' + not_a_dir], 'Error: Specified -walletdir "' + not_a_dir + '" is not a directory')
141141

142+
self.log.info("Do not allow -upgradewallet with multiwallet")
143+
self.nodes[0].assert_start_raises_init_error(['-upgradewallet'], "Error: Error parsing command line arguments: Invalid parameter -upgradewallet")
144+
142145
# if wallets/ doesn't exist, datadir should be the default wallet dir
143146
wallet_dir2 = data_dir('walletdir')
144147
os.rename(wallet_dir(), wallet_dir2)

0 commit comments

Comments
 (0)