mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-04 21:04:58 +02:00
wallet: Add IsAddressUsed / SetAddressUsed methods
This simplifies code and adds a less cumbersome interface for accessing address used information than CWallet AddDestData / EraseDestData / GetDestData methods. There is no change in behavior. Lower-level walletdb DestData methods are also still available and not affected by this change. If there is interest in consolidating destdata logic more and making it internal to walletdb, #18608 could be considered as a followup.
This commit is contained in:
@@ -390,7 +390,7 @@ BOOST_AUTO_TEST_CASE(LoadReceiveRequests)
|
||||
CTxDestination dest = PKHash();
|
||||
LOCK(m_wallet.cs_wallet);
|
||||
WalletBatch batch{m_wallet.GetDatabase()};
|
||||
m_wallet.AddDestData(batch, dest, "misc", "val_misc");
|
||||
m_wallet.SetAddressUsed(batch, dest, true);
|
||||
m_wallet.SetAddressReceiveRequest(batch, dest, "0", "val_rr0");
|
||||
m_wallet.SetAddressReceiveRequest(batch, dest, "1", "val_rr1");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user