Add valueBalance to value balances, and enforce its consensus rules

This commit is contained in:
Jack Grigg
2018-05-09 11:34:41 +01:00
parent f0daf3915f
commit 97b46f00cc
8 changed files with 102 additions and 15 deletions
+1 -3
View File
@@ -1592,9 +1592,7 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
if (isFromMyTaddr) {
CAmount nValueOut = GetValueOut(); // transparent outputs plus all vpub_old
CAmount nValueIn = 0;
for (const JSDescription & js : vjoinsplit) {
nValueIn += js.vpub_new;
}
nValueIn += GetShieldedValueIn();
nFee = nDebit - nValueOut + nValueIn;
}