Fix tallying for Sprout/Sapling value pools.

This commit is contained in:
Sean Bowe 2019-03-14 14:08:12 -06:00
parent bf4de896e7
commit cb6df4b0cc
2 changed files with 1 additions and 2 deletions

View File

@ -4092,7 +4092,6 @@ bool static LoadBlockIndexDB()
} else {
pindex->nChainSproutValue = boost::none;
}
if (pindex->pprev->nChainSaplingValue) {
pindex->nChainSaplingValue = *pindex->pprev->nChainSaplingValue + pindex->nSaplingValue;
} else {

View File

@ -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;