From cb6df4b0ccb131ebcd88f1d8aea9e670dea07ba7 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Thu, 14 Mar 2019 14:08:12 -0600 Subject: [PATCH] Fix tallying for Sprout/Sapling value pools. --- src/main.cpp | 1 - src/miner.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 26a8517ec..3516deff6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4092,7 +4092,6 @@ bool static LoadBlockIndexDB() } else { pindex->nChainSproutValue = boost::none; } - if (pindex->pprev->nChainSaplingValue) { pindex->nChainSaplingValue = *pindex->pprev->nChainSaplingValue + pindex->nSaplingValue; } else { diff --git a/src/miner.cpp b/src/miner.cpp index dc211ebec..f45582ba2 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -337,7 +337,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) CAmount sproutValueDummy = sproutValue; CAmount saplingValueDummy = saplingValue; - sproutValueDummy += -tx.valueBalance; + saplingValueDummy += -tx.valueBalance; for (auto js : tx.vjoinsplit) { sproutValueDummy += js.vpub_old;