aboutsummaryrefslogtreecommitdiff
path: root/src/coins.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2023-02-01 18:52:11 -0500
committerPieter Wuille <pieter@wuille.net>2023-02-02 09:00:15 -0500
commit59e6828bb5b56a2354a80059d3f660f551f3e207 (patch)
treef4b1749cca23c900c3d7d69b5615ae0afa8e2673 /src/coins.h
parentb0ff31084006ac7d4a7afba3190ca75f5f8441af (diff)
downloadbitcoin-59e6828bb5b56a2354a80059d3f660f551f3e207.tar.xz
Add deterministic mode to CCoinsViewCache
Diffstat (limited to 'src/coins.h')
-rw-r--r--src/coins.h5
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.