aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2022-06-11 11:35:14 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2022-06-21 10:23:20 -0300
commit032842ae4196aaed5ea3567ea01a61ed75ab2edd (patch)
treef0caffa062c268b6e3b39cb7900bf1a28d085a62 /src/wallet/wallet.h
parent09649bc95d5f2855a54a8cf02e65215a3b333c92 (diff)
downloadbitcoin-032842ae4196aaed5ea3567ea01a61ed75ab2edd.tar.xz
wallet: implement ForEachAddrBookEntry method
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h7
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.
*/