Skip to content

Commit 58b7ed1

Browse files
committed
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.
1 parent 8bd3959 commit 58b7ed1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/coins.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ struct CCoinsCacheEntry
136136

137137
CCoinsCacheEntry() noexcept = default;
138138
explicit CCoinsCacheEntry(Coin&& coin_) noexcept : coin(std::move(coin_)) {}
139+
~CCoinsCacheEntry()
140+
{
141+
ClearFlags();
142+
}
139143

140144
//! Adding a flag also requires a self reference to the pair that contains
141145
//! this entry in the CCoinsCache map and a reference to the sentinel of the

0 commit comments

Comments
 (0)