0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-07 10:27:47 -05:00

wallet: 'Filter' out 'send' addresses from 'listreceivedby*'

This commit is contained in:
Brandon Odiwuor 2024-09-24 10:24:21 +03:00
parent 84cd6478c4
commit 1ebbc00fd8

View file

@ -141,6 +141,9 @@ static UniValue ListReceived(const CWallet& wallet, const UniValue& params, cons
const auto& func = [&](const CTxDestination& address, const std::string& label, bool is_change, const std::optional<AddressPurpose>& purpose) {
if (is_change) return; // no change addresses
LOCK(wallet.cs_wallet);
if (!wallet.IsMine(address)) return; // no send addresses
auto it = mapTally.find(address);
if (it == mapTally.end() && !fIncludeEmpty)
return;