| 66 | } |
| 67 | |
| 68 | static bool GetWalletAddressesForKey(CWallet * const pwallet, const CKeyID &keyid, std::string &strAddr, std::string &strLabel) |
| 69 | { |
| 70 | bool fLabelFound = false; |
| 71 | CKey key; |
| 72 | pwallet->GetKey(keyid, key); |
| 73 | for (const auto& dest : GetAllDestinationsForKey(key.GetPubKey())) { |
| 74 | if (pwallet->mapAddressBook.count(dest)) { |
| 75 | if (!strAddr.empty()) { |
| 76 | strAddr += ","; |
| 77 | } |
| 78 | strAddr += EncodeDestination(dest); |
| 79 | strLabel = EncodeDumpString(pwallet->mapAddressBook[dest].name); |
| 80 | fLabelFound = true; |
| 81 | } |
| 82 | } |
| 83 | if (!fLabelFound) { |
| 84 | strAddr = EncodeDestination(GetDestinationForKey(key.GetPubKey(), pwallet->m_default_address_type)); |
| 85 | } |
| 86 | return fLabelFound; |
| 87 | } |
| 88 | |
| 89 | static const int64_t TIMESTAMP_MIN = 0; |
| 90 |
no test coverage detected