0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-08 10:31:50 -05:00

coins: call ClearFlags in CCoinsCacheEntry destructor

No behavior change. Prepares for flags adding CCoinsCacheEntrys
to a linked list which need to be removed on destruction.
This commit is contained in:
Andrew Toth 2024-06-28 19:49:40 -04:00
parent 8bd3959fea
commit 58b7ed156d
No known key found for this signature in database
GPG key ID: 60007AFC8938B018

View file

@ -136,6 +136,10 @@ public:
CCoinsCacheEntry() noexcept = default;
explicit CCoinsCacheEntry(Coin&& coin_) noexcept : coin(std::move(coin_)) {}
~CCoinsCacheEntry()
{
ClearFlags();
}
//! Adding a flag also requires a self reference to the pair that contains
//! this entry in the CCoinsCache map and a reference to the sentinel of the