Rename Merkle Trees to include sprout or sapling

This commit is contained in:
Eirik Ogilvie-Wigley
2018-08-01 10:31:09 -06:00
parent d84f14ec4a
commit 4fc309f0f5
28 changed files with 151 additions and 151 deletions

View File

@@ -276,7 +276,7 @@ struct CCoinsCacheEntry
struct CAnchorsSproutCacheEntry
{
bool entered; // This will be false if the anchor is removed from the cache
ZCIncrementalMerkleTree tree; // The tree itself
SproutMerkleTree tree; // The tree itself
unsigned char flags;
enum Flags {
@@ -289,7 +289,7 @@ struct CAnchorsSproutCacheEntry
struct CAnchorsSaplingCacheEntry
{
bool entered; // This will be false if the anchor is removed from the cache
ZCSaplingIncrementalMerkleTree tree; // The tree itself
SaplingMerkleTree tree; // The tree itself
unsigned char flags;
enum Flags {
@@ -341,10 +341,10 @@ class CCoinsView
{
public:
//! Retrieve the tree (Sprout) at a particular anchored root in the chain
virtual bool GetSproutAnchorAt(const uint256 &rt, ZCIncrementalMerkleTree &tree) const;
virtual bool GetSproutAnchorAt(const uint256 &rt, SproutMerkleTree &tree) const;
//! Retrieve the tree (Sapling) at a particular anchored root in the chain
virtual bool GetSaplingAnchorAt(const uint256 &rt, ZCSaplingIncrementalMerkleTree &tree) const;
virtual bool GetSaplingAnchorAt(const uint256 &rt, SaplingMerkleTree &tree) const;
//! Determine whether a nullifier is spent or not
virtual bool GetNullifier(const uint256 &nullifier, ShieldedType type) const;
@@ -389,8 +389,8 @@ protected:
public:
CCoinsViewBacked(CCoinsView *viewIn);
bool GetSproutAnchorAt(const uint256 &rt, ZCIncrementalMerkleTree &tree) const;
bool GetSaplingAnchorAt(const uint256 &rt, ZCSaplingIncrementalMerkleTree &tree) const;
bool GetSproutAnchorAt(const uint256 &rt, SproutMerkleTree &tree) const;
bool GetSaplingAnchorAt(const uint256 &rt, SaplingMerkleTree &tree) const;
bool GetNullifier(const uint256 &nullifier, ShieldedType type) const;
bool GetCoins(const uint256 &txid, CCoins &coins) const;
bool HaveCoins(const uint256 &txid) const;
@@ -460,8 +460,8 @@ public:
~CCoinsViewCache();
// Standard CCoinsView methods
bool GetSproutAnchorAt(const uint256 &rt, ZCIncrementalMerkleTree &tree) const;
bool GetSaplingAnchorAt(const uint256 &rt, ZCSaplingIncrementalMerkleTree &tree) const;
bool GetSproutAnchorAt(const uint256 &rt, SproutMerkleTree &tree) const;
bool GetSaplingAnchorAt(const uint256 &rt, SaplingMerkleTree &tree) const;
bool GetNullifier(const uint256 &nullifier, ShieldedType type) const;
bool GetCoins(const uint256 &txid, CCoins &coins) const;
bool HaveCoins(const uint256 &txid) const;