mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-13 22:41:25 +02:00
listreceivedbyaddress/listreceivedbylabel with include_empty=true walked the full address book and returned every entry with no matching mapTally record, including addresses with a "send" purpose (foreign addresses labeled via setlabel, the GUI, or addmultisigaddress) that the wallet never received funds to and does not own. Filter these out via IsMine() rather than the address book's "purpose" field, since purpose is set inconsistently across several code paths and IsMine() is the same check mapTally itself is already built from. Fixes #16159. Co-authored-by: Brandon Odiwuor <brandon.odiwuor@gmail.com>