diff options
author | Pieter Wuille <pieter@wuille.net> | 2023-02-01 18:52:11 -0500 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2023-02-02 09:00:15 -0500 |
commit | 59e6828bb5b56a2354a80059d3f660f551f3e207 (patch) | |
tree | f4b1749cca23c900c3d7d69b5615ae0afa8e2673 /src/coins.h | |
parent | b0ff31084006ac7d4a7afba3190ca75f5f8441af (diff) | |
download | bitcoin-59e6828bb5b56a2354a80059d3f660f551f3e207.tar.xz |
Add deterministic mode to CCoinsViewCache
Diffstat (limited to 'src/coins.h')
-rw-r--r-- | src/coins.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/coins.h b/src/coins.h index a2764d32bb..dd336b210a 100644 --- a/src/coins.h +++ b/src/coins.h @@ -211,6 +211,9 @@ public: /** CCoinsView that adds a memory cache for transactions to another CCoinsView */ class CCoinsViewCache : public CCoinsViewBacked { +private: + const bool m_deterministic; + protected: /** * Make mutable so that we can "fill the cache" even from Get-methods @@ -223,7 +226,7 @@ protected: mutable size_t cachedCoinsUsage{0}; public: - CCoinsViewCache(CCoinsView *baseIn); + CCoinsViewCache(CCoinsView *baseIn, bool deterministic = false); /** * By deleting the copy constructor, we prevent accidentally using it when one intends to create a cache on top of a base cache. |