diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 067015c006..da585a0603 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4025,7 +4025,7 @@ std::shared_ptr CWallet::CreateWalletFromFile(const std::string& name, if (nMaxVersion == 0) // the -upgradewallet without argument case { LogPrintf("Performing wallet upgrade to %i\n", FEATURE_LATEST); - nMaxVersion = CLIENT_VERSION; + nMaxVersion = FEATURE_LATEST; walletInstance->SetMinVersion(FEATURE_LATEST); // permanently upgrade the wallet immediately } else diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index 4b4460a794..9c25ee7d76 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -537,7 +537,7 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet) int nMinVersion = 0; if (m_batch.Read((std::string)"minversion", nMinVersion)) { - if (nMinVersion > CLIENT_VERSION) + if (nMinVersion > FEATURE_LATEST) return DBErrors::TOO_NEW; pwallet->LoadMinVersion(nMinVersion); } @@ -640,7 +640,7 @@ DBErrors WalletBatch::FindWalletTx(std::vector& vTxHash, std::vector CLIENT_VERSION) + if (nMinVersion > FEATURE_LATEST) return DBErrors::TOO_NEW; }