Track net value entering and exiting the Sprout circuit

Delta values will be stored for new blocks; old blocks can be filled in by
re-indexing. The net value currently in the Sprout circuit is only calculated
when delta values for all previous blocks are present.
This commit is contained in:
Jack Grigg
2017-11-09 22:09:54 +00:00
parent 6f9f09dfb0
commit ad6a36ad02
4 changed files with 133 additions and 0 deletions

View File

@@ -310,6 +310,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
pindexNew->nSolution = diskindex.nSolution;
pindexNew->nStatus = diskindex.nStatus;
pindexNew->nTx = diskindex.nTx;
pindexNew->nSproutValue = diskindex.nSproutValue;
if (!CheckProofOfWork(pindexNew->GetBlockHash(), pindexNew->nBits, Params().GetConsensus()))
return error("LoadBlockIndex(): CheckProofOfWork failed: %s", pindexNew->ToString());