From 24e44c354d5b9174cb9cb7d157a985e197aa7886 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Wed, 7 Jun 2017 13:00:11 -0400 Subject: Don't return stale data from CCoinsViewCache::Cursor() CCoinsViewCache doesn't actually support cursor iteration returning the current contents of the cache, so raise an error when the cursor method is called instead of returning a cursor that iterates over stale data. Also update the gettxoutsetinfo RPC which was relying on the old behavior to be explicit about which view it is returning data about. --- src/validation.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/validation.h') diff --git a/src/validation.h b/src/validation.h index 096fd0a9ee..219faf0b67 100644 --- a/src/validation.h +++ b/src/validation.h @@ -36,6 +36,7 @@ class CBlockIndex; class CBlockTreeDB; class CBloomFilter; class CChainParams; +class CCoinsViewDB; class CInv; class CConnman; class CScriptCheck; @@ -482,6 +483,9 @@ bool ResetBlockFailureFlags(CBlockIndex *pindex); /** The currently-connected chain of blocks (protected by cs_main). */ extern CChain chainActive; +/** Global variable that points to the coins database (protected by cs_main) */ +extern CCoinsViewDB *pcoinsdbview; + /** Global variable that points to the active CCoinsView (protected by cs_main) */ extern CCoinsViewCache *pcoinsTip; -- cgit v1.2.3