Start teaching hushd to track various stats about shielded xtns

This commit is contained in:
Duke Leto
2019-08-07 10:15:35 -04:00
parent 06520c26ea
commit 5c519f9665
2 changed files with 33 additions and 0 deletions

View File

@@ -4734,6 +4734,11 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
while (!queue.empty()) {
CBlockIndex *pindex = queue.front();
queue.pop_front();
// TODO: Count zxtns properly, even amount=0 xtns
// TODO: count number of joinsplits instead
if(saplingValue>0) {
pindex->nShieldedChainTx = pindex->nShieldedChainTx ? 0 : pindex->nShieldedChainTx + 1;
}
pindex->nChainTx = (pindex->pprev ? pindex->pprev->nChainTx : 0) + pindex->nTx;
if (pindex->pprev) {
if (pindex->pprev->nChainSproutValue && pindex->nSproutValue) {