From 58b7ed156d5993b69375bb455b03bd8b17f64fa4 Mon Sep 17 00:00:00 2001 From: Andrew Toth Date: Fri, 28 Jun 2024 19:49:40 -0400 Subject: [PATCH] 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. --- src/coins.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/coins.h b/src/coins.h index 8cdee3763b..09de25fc63 100644 --- a/src/coins.h +++ b/src/coins.h @@ -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