Mercurial > hg > bitcoin
changeset 238:d8db018f8a3e draft
Quick fix: bad block 74,652
author | Gavin Andresen <gavinandresen@gmail.com> |
---|---|
date | Sun, 15 Aug 2010 20:28:01 +0000 |
parents | 96105e347f4a |
children | 7de8fdede3df |
files | main.h |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/main.h +++ b/main.h @@ -473,8 +473,12 @@ // Check for negative values foreach(const CTxOut& txout, vout) + { if (txout.nValue < 0) return error("CTransaction::CheckTransaction() : txout.nValue negative"); + if (txout.nValue > 21000000*COIN) + return error("CTransaction::CheckTransaction() : txout.nValue over-max"); + } if (IsCoinBase()) { @@ -520,6 +524,8 @@ int64 nValueOut = 0; foreach(const CTxOut& txout, vout) { + if (txout.nValue > 21000000*COIN) + continue; // ignore over-max-value... if (txout.nValue < 0) throw runtime_error("CTransaction::GetValueOut() : negative value"); nValueOut += txout.nValue;