aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorW. J. van der Laan <laanwj@protonmail.com>2021-06-03 15:56:43 +0200
committerW. J. van der Laan <laanwj@protonmail.com>2021-06-03 15:57:30 +0200
commit907d636e5e76bd884a4ca1a1ebd8db68a3e64705 (patch)
tree54d1f17db002b4f480853ef456bdfa93d5248943 /src/wallet/wallet.h
parent8837f1ebde0537b0fdfa1353d06ae8e61a259982 (diff)
parentf5ba424cd44619d9b9be88b8593d69a7ba96db26 (diff)
downloadbitcoin-907d636e5e76bd884a4ca1a1ebd8db68a3e64705.tar.xz
Merge bitcoin/bitcoin#21353: interfaces: Stop exposing wallet destdata to gui
f5ba424cd44619d9b9be88b8593d69a7ba96db26 wallet: Add IsAddressUsed / SetAddressUsed methods (Russell Yanofsky) 62252c95e5aa55f33a5ef22292d5d8161fcb892a interfaces: Stop exposing wallet destdata to gui (Russell Yanofsky) 985430d9b2e183c1f59a34472e413a8d00a7e6da test: Add gui test for wallet receive requests (Russell Yanofsky) Pull request description: 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. It also adds some more GUI test coverage. There are no changes in behavior. ACKs for top commit: jarolrod: tACK f5ba424cd44619d9b9be88b8593d69a7ba96db26 laanwj: Code review ACK f5ba424cd44619d9b9be88b8593d69a7ba96db26 Tree-SHA512: 5423df4786e537a59013cb5bfb9e1bc29a7ca4b8835360c00cc2165a59f925fdc355907a4ceb8bca0285bb4946ba235bffa7645537a951ad03fd3b4cee17b6b0
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 4a3e0f7054..788a901f95 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -479,19 +479,8 @@ public:
bool LoadMinVersion(int nVersion) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) { AssertLockHeld(cs_wallet); nWalletVersion = nVersion; return true; }
- /**
- * Adds a destination data tuple to the store, and saves it to disk
- * When adding new fields, take care to consider how DelAddressBook should handle it!
- */
- bool AddDestData(WalletBatch& batch, const CTxDestination& dest, const std::string& key, const std::string& value) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
- //! Erases a destination data tuple in the store and on disk
- bool EraseDestData(WalletBatch& batch, const CTxDestination& dest, const std::string& key) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
//! Adds a destination data tuple to the store, without saving it to disk
void LoadDestData(const CTxDestination& dest, const std::string& key, const std::string& value) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
- //! Look up a destination data tuple in the store, return true if found false otherwise
- bool GetDestData(const CTxDestination& dest, const std::string& key, std::string* value) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
- //! Get all destination values matching a prefix.
- std::vector<std::string> GetDestValues(const std::string& prefix) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
//! Holds a timestamp at which point the wallet is scheduled (externally) to be relocked. Caller must arrange for actual relocking to occur via Lock().
int64_t nRelockTime GUARDED_BY(cs_wallet){0};
@@ -705,6 +694,12 @@ public:
bool DelAddressBook(const CTxDestination& address);
+ bool IsAddressUsed(const CTxDestination& dest) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
+ bool SetAddressUsed(WalletBatch& batch, const CTxDestination& dest, bool used) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
+
+ std::vector<std::string> GetAddressReceiveRequests() const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
+ bool SetAddressReceiveRequest(WalletBatch& batch, const CTxDestination& dest, const std::string& id, const std::string& value) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
+
unsigned int GetKeyPoolSize() const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
//! signify that a particular wallet feature is now used.