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

Method getAddress

src/wallet/interfaces.cpp:186–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184 return m_wallet->DelAddressBook(dest);
185 }
186 bool getAddress(const CTxDestination& dest,
187 std::string* name,
188 isminetype* is_mine,
189 std::string* purpose) override
190 {
191 LOCK(m_wallet->cs_wallet);
192 auto it = m_wallet->m_address_book.find(dest);
193 if (it == m_wallet->m_address_book.end() || it->second.IsChange()) {
194 return false;
195 }
196 if (name) {
197 *name = it->second.GetLabel();
198 }
199 if (is_mine) {
200 *is_mine = m_wallet->IsMine(dest);
201 }
202 if (purpose) {
203 *purpose = it->second.purpose;
204 }
205 return true;
206 }
207 std::vector<WalletAddress> getAddresses() override
208 {
209 LOCK(m_wallet->cs_wallet);

Callers

nothing calls this directly

Calls 5

findMethod · 0.80
IsChangeMethod · 0.80
GetLabelMethod · 0.80
endMethod · 0.45
IsMineMethod · 0.45

Tested by

no test coverage detected