Added value balance consensus enforcement for pours.
This commit is contained in:
@@ -1533,6 +1533,11 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
|
||||
|
||||
}
|
||||
|
||||
nValueIn += tx.GetPourValueIn();
|
||||
if (!MoneyRange(nValueIn))
|
||||
return state.DoS(100, error("CheckInputs(): vpub_old values out of range"),
|
||||
REJECT_INVALID, "bad-txns-inputvalues-outofrange");
|
||||
|
||||
if (nValueIn < tx.GetValueOut())
|
||||
return state.DoS(100, error("CheckInputs(): %s value in (%s) < value out (%s)",
|
||||
tx.GetHash().ToString(), FormatMoney(nValueIn), FormatMoney(tx.GetValueOut())),
|
||||
|
||||
Reference in New Issue
Block a user