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.
This commit is contained in:
Russell Yanofsky
2017-06-07 13:00:11 -04:00
parent bea5b00cfe
commit 24e44c354d
5 changed files with 10 additions and 2 deletions

View File

@@ -175,6 +175,7 @@ CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& loc
return chain.Genesis();
}
CCoinsViewDB *pcoinsdbview = NULL;
CCoinsViewCache *pcoinsTip = NULL;
CBlockTreeDB *pblocktree = NULL;