mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Wallet: Avoid treating change-in-the-addressbook as non-change everywhere
This commit is contained in:
@@ -152,7 +152,7 @@ public:
|
||||
{
|
||||
LOCK(m_wallet->cs_wallet);
|
||||
auto it = m_wallet->m_address_book.find(dest);
|
||||
if (it == m_wallet->m_address_book.end()) {
|
||||
if (it == m_wallet->m_address_book.end() || it->second.IsChange()) {
|
||||
return false;
|
||||
}
|
||||
if (name) {
|
||||
@@ -171,6 +171,7 @@ public:
|
||||
LOCK(m_wallet->cs_wallet);
|
||||
std::vector<WalletAddress> result;
|
||||
for (const auto& item : m_wallet->m_address_book) {
|
||||
if (item.second.IsChange()) continue;
|
||||
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