mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-03 10:16:14 +00:00
ProcessBlock is sometimes called with pfrom==NULL
This commit is contained in:
parent
001a64c71c
commit
1be5779124
@ -1406,7 +1406,8 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock)
|
||||
int64 deltaTime = pblock->GetBlockTime() - pcheckpoint->nTime;
|
||||
if (deltaTime < 0)
|
||||
{
|
||||
pfrom->Misbehaving(100);
|
||||
if (pfrom)
|
||||
pfrom->Misbehaving(100);
|
||||
return error("ProcessBlock() : block with timestamp before last checkpoint");
|
||||
}
|
||||
CBigNum bnNewBlock;
|
||||
@ -1415,7 +1416,8 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock)
|
||||
bnRequired.SetCompact(ComputeMinWork(pcheckpoint->nBits, deltaTime));
|
||||
if (bnNewBlock > bnRequired)
|
||||
{
|
||||
pfrom->Misbehaving(100);
|
||||
if (pfrom)
|
||||
pfrom->Misbehaving(100);
|
||||
return error("ProcessBlock() : block with too little proof-of-work");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user