aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2022-06-11 11:06:22 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2022-06-21 10:23:20 -0300
commit09649bc95d5f2855a54a8cf02e65215a3b333c92 (patch)
tree5fb9700427f6d7816f78327048832e2d3fe24deb /src/wallet/wallet.h
parent192eb1e61c3c43baec7f32c498ab0ce0656a58f7 (diff)
downloadbitcoin-09649bc95d5f2855a54a8cf02e65215a3b333c92.tar.xz
refactor: implement general 'ListAddrBookAddresses' for addressbook destinations lookup
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 7da601c3b7..970d3e2e75 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -635,7 +635,18 @@ public:
std::optional<int64_t> GetOldestKeyPoolTime() const;
- std::set<CTxDestination> GetLabelAddresses(const std::string& label) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
+ // Filter struct for 'ListAddrBookAddresses'
+ struct AddrBookFilter {
+ // Fetch addresses with the provided label
+ std::optional<std::string> m_op_label{std::nullopt};
+ // Don't include change addresses by default
+ bool ignore_change{true};
+ };
+
+ /**
+ * Filter and retrieve destinations stored in the addressbook
+ */
+ std::vector<CTxDestination> ListAddrBookAddresses(const std::optional<AddrBookFilter>& filter) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
/**
* Marks all outputs in each one of the destinations dirty, so their cache is