Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | std::vector<CWallet *>::iterator i = | ||||
std::find(vpwallets.begin(), vpwallets.end(), wallet); | std::find(vpwallets.begin(), vpwallets.end(), wallet); | ||||
if (i == vpwallets.end()) { | if (i == vpwallets.end()) { | ||||
return false; | return false; | ||||
} | } | ||||
vpwallets.erase(i); | vpwallets.erase(i); | ||||
return true; | return true; | ||||
} | } | ||||
bool HasWallets() { | |||||
return !vpwallets.empty(); | |||||
} | |||||
std::vector<CWallet *> GetWallets() { | std::vector<CWallet *> GetWallets() { | ||||
return vpwallets; | return vpwallets; | ||||
} | } | ||||
CWallet *GetWallet(const std::string &name) { | CWallet *GetWallet(const std::string &name) { | ||||
for (CWallet *wallet : vpwallets) { | for (CWallet *wallet : vpwallets) { | ||||
if (wallet->GetName() == name) { | if (wallet->GetName() == name) { | ||||
return wallet; | return wallet; | ||||
▲ Show 20 Lines • Show All 4,612 Lines • Show Last 20 Lines |