Created
June 13, 2014 14:55
-
-
Save orphanate/9ec588bbe8211fefa91c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| if (pcheckpoint && pblock->hashPrevBlock != hashBestChain && !Checkpoints::WantedByPendingSyncCheckpoint(hash)) | |
| { | |
| // Extra checks to prevent "fill up memory by spamming with bogus blocks" | |
| int64_t deltaTime = pblock->GetBlockTime() - pcheckpoint->nTime; | |
| CBigNum bnNewBlock; | |
| bnNewBlock.SetCompact(pblock->nBits); | |
| CBigNum bnRequired; | |
| if (pblock->IsProofOfStake()) | |
| bnRequired.SetCompact(ComputeMinStake(GetLastBlockIndex(pcheckpoint, true)->nBits, deltaTime, pblock->nTime)); | |
| else | |
| bnRequired.SetCompact(ComputeMinWork(GetLastBlockIndex(pcheckpoint, false)->nBits, deltaTime)); | |
| if (bnNewBlock > bnRequired) | |
| { | |
| if (pfrom) | |
| pfrom->Misbehaving(100); | |
| // return error("ProcessBlock() : block with too little %s", pblock->IsProofOfStake()? "proof-of-stake" : "proof-of-work"); | |
| return error("ProcessBlock() : block with too little %s bnNewBlock %s bnRequired %s", | |
| pblock->IsProofOfStake()? "proof-of-stake" : "proof-of-work", | |
| bnNewBlock.ToString().c_str(), bnRequired.ToString().c_str()); | |
| } | |
| } | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment