Wallet: Replace pwalletMain with a vector of wallet pointers

This commit is contained in:
Luke Dashjr
2016-09-09 08:42:30 +00:00
parent 19b3648bb5
commit b124cf04ea
10 changed files with 51 additions and 45 deletions

View File

@@ -35,7 +35,7 @@
#include <boost/algorithm/string/replace.hpp>
#include <boost/thread.hpp>
CWallet* pwalletMain = NULL;
std::vector<CWalletRef> vpwallets;
/** Transaction fee set by the user */
CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE);
unsigned int nTxConfirmTarget = DEFAULT_TX_CONFIRM_TARGET;
@@ -3926,7 +3926,6 @@ CWallet* CWallet::CreateWalletFromFile(const std::string walletFile)
bool CWallet::InitLoadWallet()
{
if (GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) {
pwalletMain = NULL;
LogPrintf("Wallet disabled!\n");
return true;
}
@@ -3943,7 +3942,7 @@ bool CWallet::InitLoadWallet()
if (!pwallet) {
return false;
}
pwalletMain = pwallet;
vpwallets.push_back(pwallet);
return true;
}