Add valueBalance to value balances, and enforce its consensus rules

This commit is contained in:
Jack Grigg
2018-05-08 13:51:54 +01:00
parent f0daf3915f
commit 97b46f00cc
8 changed files with 102 additions and 15 deletions

View File

@@ -651,13 +651,13 @@ public:
return header;
}
// Return sum of txouts.
// Return sum of txouts, (negative valueBalance or zero) and JoinSplit vpub_old.
CAmount GetValueOut() const;
// GetValueIn() is a method on CCoinsViewCache, because
// inputs must be known to compute value in.
// Return sum of JoinSplit vpub_new
CAmount GetJoinSplitValueIn() const;
// Return sum of (positive valueBalance or zero) and JoinSplit vpub_new
CAmount GetShieldedValueIn() const;
// Compute priority, given priority of inputs and (optionally) tx size
double ComputePriority(double dPriorityInputs, unsigned int nTxSize=0) const;