This sprout shite cannot be deleted yet
This commit is contained in:
@@ -286,6 +286,14 @@ void CCoinsViewCache::AbstractPopAnchor(
|
|||||||
|
|
||||||
void CCoinsViewCache::PopAnchor(const uint256 &newrt, ShieldedType type) {
|
void CCoinsViewCache::PopAnchor(const uint256 &newrt, ShieldedType type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case SPROUT:
|
||||||
|
AbstractPopAnchor<SproutMerkleTree, CAnchorsSproutMap, CAnchorsSproutCacheEntry>(
|
||||||
|
newrt,
|
||||||
|
SPROUT,
|
||||||
|
cacheSproutAnchors,
|
||||||
|
hashSproutAnchor
|
||||||
|
);
|
||||||
|
break;
|
||||||
case SAPLING:
|
case SAPLING:
|
||||||
AbstractPopAnchor<SaplingMerkleTree, CAnchorsSaplingMap, CAnchorsSaplingCacheEntry>(
|
AbstractPopAnchor<SaplingMerkleTree, CAnchorsSaplingMap, CAnchorsSaplingCacheEntry>(
|
||||||
newrt,
|
newrt,
|
||||||
@@ -373,9 +381,13 @@ uint256 CCoinsViewCache::GetBestBlock() const {
|
|||||||
return hashBlock;
|
return hashBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint256 CCoinsViewCache::GetBestAnchor(ShieldedType type) const {
|
uint256 CCoinsViewCache::GetBestAnchor(ShieldedType type) const {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case SPROUT:
|
||||||
|
if (hashSproutAnchor.IsNull())
|
||||||
|
hashSproutAnchor = base->GetBestAnchor(type);
|
||||||
|
return hashSproutAnchor;
|
||||||
|
break;
|
||||||
case SAPLING:
|
case SAPLING:
|
||||||
if (hashSaplingAnchor.IsNull())
|
if (hashSaplingAnchor.IsNull())
|
||||||
hashSaplingAnchor = base->GetBestAnchor(type);
|
hashSaplingAnchor = base->GetBestAnchor(type);
|
||||||
|
|||||||
Reference in New Issue
Block a user