Browse Source

Merge branch 'fixnullpfrom' of https://github.com/sipa/bitcoin

0.8
Gavin Andresen 13 years ago
parent
commit
6fe8c45375
  1. 2
      src/main.cpp

2
src/main.cpp

@ -1655,6 +1655,7 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock) @@ -1655,6 +1655,7 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock)
int64 deltaTime = pblock->GetBlockTime() - pcheckpoint->nTime;
if (deltaTime < 0)
{
if (pfrom)
pfrom->Misbehaving(100);
return error("ProcessBlock() : block with timestamp before last checkpoint");
}
@ -1664,6 +1665,7 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock) @@ -1664,6 +1665,7 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock)
bnRequired.SetCompact(ComputeMinWork(pcheckpoint->nBits, deltaTime));
if (bnNewBlock > bnRequired)
{
if (pfrom)
pfrom->Misbehaving(100);
return error("ProcessBlock() : block with too little proof-of-work");
}

Loading…
Cancel
Save