MCPcopy Create free account
hub / github.com/ElementsProject/elements / AddWallet

Function AddWallet

src/wallet/wallet.cpp:120–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120bool AddWallet(WalletContext& context, const std::shared_ptr<CWallet>& wallet)
121{
122 LOCK(context.wallets_mutex);
123 assert(wallet);
124 std::vector<std::shared_ptr<CWallet>>::const_iterator i = std::find(context.wallets.begin(), context.wallets.end(), wallet);
125 if (i != context.wallets.end()) return false;
126 context.wallets.push_back(wallet);
127 wallet->ConnectScriptPubKeyManNotifiers();
128 wallet->NotifyCanGetAddressesChanged();
129 return true;
130}
131
132bool RemoveWallet(WalletContext& context, const std::shared_ptr<CWallet>& wallet, std::optional<bool> load_on_start, std::vector<bilingual_str>& warnings)
133{

Callers 6

LoadWalletInternalFunction · 0.85
CreateWalletFunction · 0.85
LoadWalletsFunction · 0.85
BOOST_FIXTURE_TEST_CASEFunction · 0.85
TestGUIFunction · 0.85

Calls 4

beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by 3

BOOST_FIXTURE_TEST_CASEFunction · 0.68
TestGUIFunction · 0.68