Merge branch 'fixnullpfrom' of https://github.com/sipa/bitcoin
This commit is contained in:
commit
6fe8c45375
1 changed files with 4 additions and 2 deletions
|
@ -1655,7 +1655,8 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock)
|
||||||
int64 deltaTime = pblock->GetBlockTime() - pcheckpoint->nTime;
|
int64 deltaTime = pblock->GetBlockTime() - pcheckpoint->nTime;
|
||||||
if (deltaTime < 0)
|
if (deltaTime < 0)
|
||||||
{
|
{
|
||||||
pfrom->Misbehaving(100);
|
if (pfrom)
|
||||||
|
pfrom->Misbehaving(100);
|
||||||
return error("ProcessBlock() : block with timestamp before last checkpoint");
|
return error("ProcessBlock() : block with timestamp before last checkpoint");
|
||||||
}
|
}
|
||||||
CBigNum bnNewBlock;
|
CBigNum bnNewBlock;
|
||||||
|
@ -1664,7 +1665,8 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock)
|
||||||
bnRequired.SetCompact(ComputeMinWork(pcheckpoint->nBits, deltaTime));
|
bnRequired.SetCompact(ComputeMinWork(pcheckpoint->nBits, deltaTime));
|
||||||
if (bnNewBlock > bnRequired)
|
if (bnNewBlock > bnRequired)
|
||||||
{
|
{
|
||||||
pfrom->Misbehaving(100);
|
if (pfrom)
|
||||||
|
pfrom->Misbehaving(100);
|
||||||
return error("ProcessBlock() : block with too little proof-of-work");
|
return error("ProcessBlock() : block with too little proof-of-work");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue