Browse Source

This sprout shite cannot be deleted yet

dev
Duke Leto 4 years ago
parent
commit
ebe24f9f90
  1. 14
      src/coins.cpp

14
src/coins.cpp

@ -286,6 +286,14 @@ void CCoinsViewCache::AbstractPopAnchor(
void CCoinsViewCache::PopAnchor(const uint256 &newrt, ShieldedType type) {
switch (type) {
case SPROUT:
AbstractPopAnchor<SproutMerkleTree, CAnchorsSproutMap, CAnchorsSproutCacheEntry>(
newrt,
SPROUT,
cacheSproutAnchors,
hashSproutAnchor
);
break;
case SAPLING:
AbstractPopAnchor<SaplingMerkleTree, CAnchorsSaplingMap, CAnchorsSaplingCacheEntry>(
newrt,
@ -373,9 +381,13 @@ uint256 CCoinsViewCache::GetBestBlock() const {
return hashBlock;
}
uint256 CCoinsViewCache::GetBestAnchor(ShieldedType type) const {
switch (type) {
case SPROUT:
if (hashSproutAnchor.IsNull())
hashSproutAnchor = base->GetBestAnchor(type);
return hashSproutAnchor;
break;
case SAPLING:
if (hashSaplingAnchor.IsNull())
hashSaplingAnchor = base->GetBestAnchor(type);

Loading…
Cancel
Save