mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Merge bitcoin/bitcoin#21353: interfaces: Stop exposing wallet destdata to gui
f5ba424cd4wallet: Add IsAddressUsed / SetAddressUsed methods (Russell Yanofsky)62252c95e5interfaces: Stop exposing wallet destdata to gui (Russell Yanofsky)985430d9b2test: 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: tACKf5ba424cd4laanwj: Code review ACKf5ba424cd4Tree-SHA512: 5423df4786e537a59013cb5bfb9e1bc29a7ca4b8835360c00cc2165a59f925fdc355907a4ceb8bca0285bb4946ba235bffa7645537a951ad03fd3b4cee17b6b0
This commit is contained in:
@@ -466,25 +466,6 @@ void WalletModel::UnlockContext::CopyFrom(UnlockContext&& rhs)
|
||||
rhs.relock = false;
|
||||
}
|
||||
|
||||
void WalletModel::loadReceiveRequests(std::vector<std::string>& vReceiveRequests)
|
||||
{
|
||||
vReceiveRequests = m_wallet->getDestValues("rr"); // receive request
|
||||
}
|
||||
|
||||
bool WalletModel::saveReceiveRequest(const std::string &sAddress, const int64_t nId, const std::string &sRequest)
|
||||
{
|
||||
CTxDestination dest = DecodeDestination(sAddress);
|
||||
|
||||
std::stringstream ss;
|
||||
ss << nId;
|
||||
std::string key = "rr" + ss.str(); // "rr" prefix = "receive request" in destdata
|
||||
|
||||
if (sRequest.empty())
|
||||
return m_wallet->eraseDestData(dest, key);
|
||||
else
|
||||
return m_wallet->addDestData(dest, key, sRequest);
|
||||
}
|
||||
|
||||
bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
|
||||
{
|
||||
CCoinControl coin_control;
|
||||
|
||||
Reference in New Issue
Block a user