Add enum for nullifier type
This commit is contained in:
12
src/coins.h
12
src/coins.h
@@ -298,6 +298,12 @@ struct CNullifiersCacheEntry
|
||||
CNullifiersCacheEntry() : entered(false), flags(0) {}
|
||||
};
|
||||
|
||||
enum NullifierType
|
||||
{
|
||||
SPROUT_NULLIFIER,
|
||||
SAPLING_NULLIFIER,
|
||||
};
|
||||
|
||||
typedef boost::unordered_map<uint256, CCoinsCacheEntry, CCoinsKeyHasher> CCoinsMap;
|
||||
typedef boost::unordered_map<uint256, CAnchorsCacheEntry, CCoinsKeyHasher> CAnchorsMap;
|
||||
typedef boost::unordered_map<uint256, CNullifiersCacheEntry, CCoinsKeyHasher> CNullifiersMap;
|
||||
@@ -324,7 +330,7 @@ public:
|
||||
virtual bool GetAnchorAt(const uint256 &rt, ZCIncrementalMerkleTree &tree) const;
|
||||
|
||||
//! Determine whether a nullifier is spent or not
|
||||
virtual bool GetNullifier(const uint256 &nullifier, bool isSapling) const;
|
||||
virtual bool GetNullifier(const uint256 &nullifier, NullifierType type) const;
|
||||
|
||||
//! Retrieve the CCoins (unspent transaction outputs) for a given txid
|
||||
virtual bool GetCoins(const uint256 &txid, CCoins &coins) const;
|
||||
@@ -365,7 +371,7 @@ protected:
|
||||
public:
|
||||
CCoinsViewBacked(CCoinsView *viewIn);
|
||||
bool GetAnchorAt(const uint256 &rt, ZCIncrementalMerkleTree &tree) const;
|
||||
bool GetNullifier(const uint256 &nullifier, bool isSapling) const;
|
||||
bool GetNullifier(const uint256 &nullifier, NullifierType type) const;
|
||||
bool GetCoins(const uint256 &txid, CCoins &coins) const;
|
||||
bool HaveCoins(const uint256 &txid) const;
|
||||
uint256 GetBestBlock() const;
|
||||
@@ -431,7 +437,7 @@ public:
|
||||
|
||||
// Standard CCoinsView methods
|
||||
bool GetAnchorAt(const uint256 &rt, ZCIncrementalMerkleTree &tree) const;
|
||||
bool GetNullifier(const uint256 &nullifier, bool isSapling) const;
|
||||
bool GetNullifier(const uint256 &nullifier, NullifierType type) const;
|
||||
bool GetCoins(const uint256 &txid, CCoins &coins) const;
|
||||
bool HaveCoins(const uint256 &txid) const;
|
||||
uint256 GetBestBlock() const;
|
||||
|
||||
Reference in New Issue
Block a user