diff --git a/src/coins.cpp b/src/coins.cpp index 29172cb9f..c8b98d428 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -231,6 +231,15 @@ void CCoinsViewCache::PushSproutAnchor(const ZCIncrementalMerkleTree &tree) { ); } +void CCoinsViewCache::PushSaplingAnchor(const ZCSaplingIncrementalMerkleTree &tree) { + AbstractPushAnchor( + tree, + SAPLING, + cacheSaplingAnchors, + hashSaplingAnchor + ); +} + template<> void CCoinsViewCache::BringBestAnchorIntoCache( const uint256 ¤tRoot, diff --git a/src/coins.h b/src/coins.h index 513f9140b..bd5105024 100644 --- a/src/coins.h +++ b/src/coins.h @@ -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);