diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2022-06-11 11:35:14 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2022-06-21 10:23:20 -0300 |
commit | 032842ae4196aaed5ea3567ea01a61ed75ab2edd (patch) | |
tree | f0caffa062c268b6e3b39cb7900bf1a28d085a62 /src/wallet/wallet.h | |
parent | 09649bc95d5f2855a54a8cf02e65215a3b333c92 (diff) | |
download | bitcoin-032842ae4196aaed5ea3567ea01a61ed75ab2edd.tar.xz |
wallet: implement ForEachAddrBookEntry method
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r-- | src/wallet/wallet.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 970d3e2e75..3775f325ba 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -649,6 +649,13 @@ public: std::vector<CTxDestination> ListAddrBookAddresses(const std::optional<AddrBookFilter>& filter) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); /** + * Walk-through the address book entries. + * Stops when the provided 'ListAddrBookFunc' returns false. + */ + using ListAddrBookFunc = std::function<void(const CTxDestination& dest, const std::string& label, const std::string& purpose, bool is_change)>; + void ForEachAddrBookEntry(const ListAddrBookFunc& func) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); + + /** * Marks all outputs in each one of the destinations dirty, so their cache is * reset and does not return outdated information. */ |