aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2020-04-12 13:40:43 -0400
committerRussell Yanofsky <russ@yanofsky.org>2021-03-03 10:19:35 -0400
commit62252c95e5aa55f33a5ef22292d5d8161fcb892a (patch)
treef234ce0a5a2d8bdeb32cd2a57188f34c4bf9fc50 /src/interfaces
parent985430d9b2e183c1f59a34472e413a8d00a7e6da (diff)
downloadbitcoin-62252c95e5aa55f33a5ef22292d5d8161fcb892a.tar.xz
interfaces: Stop exposing wallet destdata to gui
Stop giving GUI access to destdata rows in database. Replace with narrow API just for saving and reading receive request information. This simplifies code and should prevent the GUI from interfering with other destdata like address-used status. Note: No user-visible behavior is changing in this commit. New CWallet::SetAddressReceiveRequest() implementation avoids a bug in CWallet::AddDestData() where a modification would leave the previous value in memory while writing the new value to disk. But it doesn't matter because the GUI doesn't currently expose the ability to modify receive requests, only to add and erase them.
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/wallet.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/interfaces/wallet.h b/src/interfaces/wallet.h
index 6ccfd7fc20..88f93321f9 100644
--- a/src/interfaces/wallet.h
+++ b/src/interfaces/wallet.h
@@ -112,14 +112,11 @@ public:
//! Get wallet address list.
virtual std::vector<WalletAddress> getAddresses() = 0;
- //! Add dest data.
- virtual bool addDestData(const CTxDestination& dest, const std::string& key, const std::string& value) = 0;
+ //! Get receive requests.
+ virtual std::vector<std::string> getAddressReceiveRequests() = 0;
- //! Erase dest data.
- virtual bool eraseDestData(const CTxDestination& dest, const std::string& key) = 0;
-
- //! Get dest values with prefix.
- virtual std::vector<std::string> getDestValues(const std::string& prefix) = 0;
+ //! Save or remove receive request.
+ virtual bool setAddressReceiveRequest(const CTxDestination& dest, const std::string& id, const std::string& value) = 0;
//! Lock coin.
virtual void lockCoin(const COutPoint& output) = 0;