Quick fix: bad block 74,652
This commit is contained in:
parent
7f71fd13ae
commit
2d12315c94
6
main.h
6
main.h
@ -473,8 +473,12 @@ public:
|
|||||||
|
|
||||||
// Check for negative values
|
// Check for negative values
|
||||||
foreach(const CTxOut& txout, vout)
|
foreach(const CTxOut& txout, vout)
|
||||||
|
{
|
||||||
if (txout.nValue < 0)
|
if (txout.nValue < 0)
|
||||||
return error("CTransaction::CheckTransaction() : txout.nValue negative");
|
return error("CTransaction::CheckTransaction() : txout.nValue negative");
|
||||||
|
if (txout.nValue > 21000000*COIN)
|
||||||
|
return error("CTransaction::CheckTransaction() : txout.nValue over-max");
|
||||||
|
}
|
||||||
|
|
||||||
if (IsCoinBase())
|
if (IsCoinBase())
|
||||||
{
|
{
|
||||||
@ -520,6 +524,8 @@ public:
|
|||||||
int64 nValueOut = 0;
|
int64 nValueOut = 0;
|
||||||
foreach(const CTxOut& txout, vout)
|
foreach(const CTxOut& txout, vout)
|
||||||
{
|
{
|
||||||
|
if (txout.nValue > 21000000*COIN)
|
||||||
|
continue; // ignore over-max-value...
|
||||||
if (txout.nValue < 0)
|
if (txout.nValue < 0)
|
||||||
throw runtime_error("CTransaction::GetValueOut() : negative value");
|
throw runtime_error("CTransaction::GetValueOut() : negative value");
|
||||||
nValueOut += txout.nValue;
|
nValueOut += txout.nValue;
|
||||||
|
Loading…
Reference in New Issue
Block a user