From ebe24f9f903921f3d9dfca3c3d8ca49b6f563ca8 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 5 Dec 2020 08:40:28 -0500 Subject: [PATCH] This sprout shite cannot be deleted yet --- src/coins.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/coins.cpp b/src/coins.cpp index 95600f224..9ffd10e33 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -286,6 +286,14 @@ void CCoinsViewCache::AbstractPopAnchor( void CCoinsViewCache::PopAnchor(const uint256 &newrt, ShieldedType type) { switch (type) { + case SPROUT: + AbstractPopAnchor( + newrt, + SPROUT, + cacheSproutAnchors, + hashSproutAnchor + ); + break; case SAPLING: AbstractPopAnchor( 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);