mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
ProcessBlock is sometimes called with pfrom==NULL
This commit is contained in:
parent
0d56f11ada
commit
73aa0421a7
@ -1652,7 +1652,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;
|
||||
@ -1661,7 +1662,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…
Reference in New Issue
Block a user