diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp --- a/src/interfaces/node.cpp +++ b/src/interfaces/node.cpp @@ -235,7 +235,7 @@ std::vector> getWallets() override { #ifdef ENABLE_WALLET std::vector> wallets; - for (CWalletRef wallet : ::vpwallets) { + for (CWallet *wallet : ::vpwallets) { wallets.emplace_back(MakeWallet(*wallet)); } return wallets; diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp --- a/src/wallet/init.cpp +++ b/src/wallet/init.cpp @@ -390,25 +390,25 @@ } void WalletInit::Start(CScheduler &scheduler) const { - for (CWalletRef pwallet : vpwallets) { + for (CWallet *pwallet : vpwallets) { pwallet->postInitProcess(scheduler); } } void WalletInit::Flush() const { - for (CWalletRef pwallet : vpwallets) { + for (CWallet *pwallet : vpwallets) { pwallet->Flush(false); } } void WalletInit::Stop() const { - for (CWalletRef pwallet : vpwallets) { + for (CWallet *pwallet : vpwallets) { pwallet->Flush(true); } } void WalletInit::Close() const { - for (CWalletRef pwallet : vpwallets) { + for (CWallet *pwallet : vpwallets) { delete pwallet; } vpwallets.clear(); diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -56,7 +56,7 @@ // wallet endpoint was used std::string requestedWallet = urlDecode(request.URI.substr(WALLET_ENDPOINT_BASE.size())); - for (CWalletRef pwallet : ::vpwallets) { + for (CWallet *pwallet : ::vpwallets) { if (pwallet->GetName() == requestedWallet) { return pwallet; } @@ -3269,7 +3269,7 @@ UniValue obj(UniValue::VARR); - for (CWalletRef pwallet : vpwallets) { + for (CWallet *pwallet : vpwallets) { if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) { return NullUniValue; } diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -31,8 +31,7 @@ #include #include -typedef CWallet *CWalletRef; -extern std::vector vpwallets; +extern std::vector vpwallets; static const unsigned int DEFAULT_KEYPOOL_SIZE = 1000; //! -paytxfee default @@ -1348,11 +1347,11 @@ /** RAII object to check and reserve a wallet rescan */ class WalletRescanReserver { private: - CWalletRef m_wallet; + CWallet *m_wallet; bool m_could_reserve; public: - explicit WalletRescanReserver(CWalletRef w) + explicit WalletRescanReserver(CWallet *w) : m_wallet(w), m_could_reserve(false) {} bool reserve() { diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -44,7 +44,7 @@ static const size_t OUTPUT_GROUP_MAX_ENTRIES = 10; -std::vector vpwallets; +std::vector vpwallets; OutputType g_address_type = OutputType::NONE; OutputType g_change_type = OutputType::NONE; diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -757,7 +757,7 @@ return; } - for (CWalletRef pwallet : vpwallets) { + for (CWallet *pwallet : vpwallets) { CWalletDBWrapper &dbh = pwallet->GetDBHandle(); unsigned int nUpdateCounter = dbh.nUpdateCounter;