MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / AddWallet

Function AddWallet

src/wallet/wallet.cpp:159–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159bool AddWallet(WalletContext& context, const std::shared_ptr<CWallet>& wallet)
160{
161 LOCK(context.wallets_mutex);
162 assert(wallet);
163 std::vector<std::shared_ptr<CWallet>>::const_iterator i = std::find(context.wallets.begin(), context.wallets.end(), wallet);
164 if (i != context.wallets.end()) return false;
165 context.wallets.push_back(wallet);
166 wallet->ConnectScriptPubKeyManNotifiers();
167 wallet->NotifyCanGetAddressesChanged();
168 return true;
169}
170
171bool RemoveWallet(WalletContext& context, const std::shared_ptr<CWallet>& wallet, std::optional<bool> load_on_start, std::vector<bilingual_str>& warnings)
172{

Callers 5

LoadWalletInternalFunction · 0.85
CreateWalletFunction · 0.85
LoadWalletsFunction · 0.85
initModelForWalletMethod · 0.85

Calls 4

beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by 2

initModelForWalletMethod · 0.68