mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 14:34:49 +01:00
wallet: Remove -upgradewallet from dummywallet
This commit is contained in:
parent
a314271f08
commit
5f9c0b6360
3 changed files with 4 additions and 3 deletions
|
@ -40,7 +40,6 @@ void DummyWalletInit::AddWalletOptions(ArgsManager& argsman) const
|
|||
"-salvagewallet",
|
||||
"-spendzeroconfchange",
|
||||
"-txconfirmtarget=<n>",
|
||||
"-upgradewallet",
|
||||
"-wallet=<path>",
|
||||
"-walletbroadcast",
|
||||
"-walletdir=<dir>",
|
||||
|
|
|
@ -4100,8 +4100,7 @@ const CAddressBookData* CWallet::FindAddressBookEntry(const CTxDestination& dest
|
|||
bool CWallet::UpgradeWallet(int version, bilingual_str& error, std::vector<bilingual_str>& warnings)
|
||||
{
|
||||
int prev_version = GetVersion();
|
||||
if (version == 0) // the -upgradewallet without argument case
|
||||
{
|
||||
if (version == 0) {
|
||||
WalletLogPrintf("Performing wallet upgrade to %i\n", FEATURE_LATEST);
|
||||
version = FEATURE_LATEST;
|
||||
} else {
|
||||
|
|
|
@ -139,6 +139,9 @@ class MultiWalletTest(BitcoinTestFramework):
|
|||
open(not_a_dir, 'a', encoding="utf8").close()
|
||||
self.nodes[0].assert_start_raises_init_error(['-walletdir=' + not_a_dir], 'Error: Specified -walletdir "' + not_a_dir + '" is not a directory')
|
||||
|
||||
self.log.info("Do not allow -upgradewallet with multiwallet")
|
||||
self.nodes[0].assert_start_raises_init_error(['-upgradewallet'], "Error: Error parsing command line arguments: Invalid parameter -upgradewallet")
|
||||
|
||||
# if wallets/ doesn't exist, datadir should be the default wallet dir
|
||||
wallet_dir2 = data_dir('walletdir')
|
||||
os.rename(wallet_dir(), wallet_dir2)
|
||||
|
|
Loading…
Add table
Reference in a new issue