wallet: Add AddWallet, RemoveWallet, GetWallet and GetWallets

With these new functions all vpwallets usage are removed
and vpwallets is now a static variable (no external linkage).
This commit is contained in:
João Barbosa
2018-04-17 18:22:23 +01:00
parent 6efd9644cf
commit 373aee26c3
9 changed files with 72 additions and 38 deletions

View File

@@ -239,7 +239,7 @@ class NodeImpl : public Node
{
#ifdef ENABLE_WALLET
std::vector<std::unique_ptr<Wallet>> wallets;
for (CWallet* wallet : ::vpwallets) {
for (CWallet* wallet : GetWallets()) {
wallets.emplace_back(MakeWallet(*wallet));
}
return wallets;