Add mapSerials infrastructure to CCoinsView.

This adds the TXDB/CCoinsViewCache primitives necessary for
writing consensus rules for mapSerials later.
This commit is contained in:
Sean Bowe
2016-01-04 03:34:58 -07:00
parent 9f25631d50
commit 45d6bee945
5 changed files with 168 additions and 10 deletions

View File

@@ -37,6 +37,7 @@ public:
CCoinsViewDB(size_t nCacheSize, bool fMemory = false, bool fWipe = false);
bool GetAnchorAt(const uint256 &rt, libzerocash::IncrementalMerkleTree &tree) const;
bool GetSerial(const uint256 &serial) const;
bool GetCoins(const uint256 &txid, CCoins &coins) const;
bool HaveCoins(const uint256 &txid) const;
uint256 GetBestBlock() const;
@@ -44,7 +45,8 @@ public:
bool BatchWrite(CCoinsMap &mapCoins,
const uint256 &hashBlock,
const uint256 &hashAnchor,
CAnchorsMap &mapAnchors);
CAnchorsMap &mapAnchors,
CSerialsMap &mapSerials);
bool GetStats(CCoinsStats &stats) const;
};