diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2012-02-22 11:25:08 -0500 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2012-02-22 11:25:08 -0500 |
commit | 6fe8c45375f883813e646175d557ccbbf5b9926d (patch) | |
tree | 62e54562cf4599d7b59d2409956e448e1e66e2b0 /src | |
parent | e7e6ae210458e37a012d5557cd0267b2d86d9fa8 (diff) | |
parent | 73aa0421a73952ce13d731d8bbeabd2bb85d0bbf (diff) |
Merge branch 'fixnullpfrom' of https://github.com/sipa/bitcoin
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 8103c8ad82..a9311e2ceb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1655,7 +1655,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; @@ -1664,7 +1665,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"); } } |