Track net value entering and exiting the Sapling circuit

This commit is contained in:
Jack Grigg
2018-05-09 12:15:46 +01:00
parent f0daf3915f
commit ae97177c86
3 changed files with 42 additions and 0 deletions

View File

@@ -159,6 +159,7 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool tx
UniValue valuePools(UniValue::VARR);
valuePools.push_back(ValuePoolDesc("sprout", blockindex->nChainSproutValue, blockindex->nSproutValue));
valuePools.push_back(ValuePoolDesc("sapling", blockindex->nChainSaplingValue, blockindex->nSaplingValue));
result.push_back(Pair("valuePools", valuePools));
if (blockindex->pprev)
@@ -776,6 +777,7 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp)
CBlockIndex* tip = chainActive.Tip();
UniValue valuePools(UniValue::VARR);
valuePools.push_back(ValuePoolDesc("sprout", tip->nChainSproutValue, boost::none));
valuePools.push_back(ValuePoolDesc("sapling", tip->nChainSaplingValue, boost::none));
obj.push_back(Pair("valuePools", valuePools));
const Consensus::Params& consensusParams = Params().GetConsensus();