scripted-diff: Wallet: Rename mapAddressBook to m_address_book

Previous versions assumed absence of an entry in mapAddressBook indicated change.
This no longer holds true (due to bugs) and will shortly be made intentional.
Renaming the field helps ensure that old code using mapAddressBook directly gets checked for necessary rebasing.

-BEGIN VERIFY SCRIPT-
sed -i -e 's/mapAddressBook/m_address_book/g' $(git grep -l 'mapAddressBook' ./src)
-END VERIFY SCRIPT-
This commit is contained in:
Luke Dashjr
2020-02-21 21:52:52 +00:00
parent 41fa2926d8
commit b86cd155f6
9 changed files with 47 additions and 47 deletions

View File

@@ -151,8 +151,8 @@ public:
std::string* purpose) override
{
LOCK(m_wallet->cs_wallet);
auto it = m_wallet->mapAddressBook.find(dest);
if (it == m_wallet->mapAddressBook.end()) {
auto it = m_wallet->m_address_book.find(dest);
if (it == m_wallet->m_address_book.end()) {
return false;
}
if (name) {
@@ -170,7 +170,7 @@ public:
{
LOCK(m_wallet->cs_wallet);
std::vector<WalletAddress> result;
for (const auto& item : m_wallet->mapAddressBook) {
for (const auto& item : m_wallet->m_address_book) {
result.emplace_back(item.first, m_wallet->IsMine(item.first), item.second.name, item.second.purpose);
}
return result;