mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user