Add PushSaplingAnchor
This commit is contained in:
@@ -231,6 +231,15 @@ void CCoinsViewCache::PushSproutAnchor(const ZCIncrementalMerkleTree &tree) {
|
||||
);
|
||||
}
|
||||
|
||||
void CCoinsViewCache::PushSaplingAnchor(const ZCSaplingIncrementalMerkleTree &tree) {
|
||||
AbstractPushAnchor<ZCSaplingIncrementalMerkleTree, CAnchorsSaplingMap, CAnchorsSaplingMap::iterator, CAnchorsSaplingCacheEntry>(
|
||||
tree,
|
||||
SAPLING,
|
||||
cacheSaplingAnchors,
|
||||
hashSaplingAnchor
|
||||
);
|
||||
}
|
||||
|
||||
template<>
|
||||
void CCoinsViewCache::BringBestAnchorIntoCache(
|
||||
const uint256 ¤tRoot,
|
||||
|
||||
@@ -478,10 +478,14 @@ public:
|
||||
CNullifiersMap &mapSaplingNullifiers);
|
||||
|
||||
|
||||
// Adds the tree to mapAnchors and sets the current commitment
|
||||
// Adds the tree to mapSproutAnchors and sets the current commitment
|
||||
// root to this root.
|
||||
void PushSproutAnchor(const ZCIncrementalMerkleTree &tree);
|
||||
|
||||
// Adds the tree to mapSaplingAnchors and sets the current commitment
|
||||
// root to this root.
|
||||
void PushSaplingAnchor(const ZCSaplingIncrementalMerkleTree &tree);
|
||||
|
||||
// Removes the current commitment root from mapAnchors and sets
|
||||
// the new current root.
|
||||
void PopAnchor(const uint256 &rt, ShieldedType type);
|
||||
|
||||
Reference in New Issue
Block a user