aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorjtimon <jtimon@monetize.io>2014-06-20 20:55:42 +0200
committerjtimon <jtimon@monetize.io>2014-08-23 13:21:51 +0200
commit654871d43677947d124673c9e0dd2984f0d3ca61 (patch)
tree7a8cdc2a1ef9f46ddecea998a07936f3a1481926 /src/main.cpp
parentb343c1a1e34f851e70649ad1f49855a7d878f9ef (diff)
replace ComputeMinWork with CheckMinWork
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index fab5af73bb..9e07f43c44 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2410,12 +2410,7 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
return state.DoS(100, error("CheckBlockHeader() : block with timestamp before last checkpoint"),
REJECT_CHECKPOINT, "time-too-old");
}
- bool fOverflow = false;
- uint256 bnNewBlock;
- bnNewBlock.SetCompact(block.nBits, NULL, &fOverflow);
- uint256 bnRequired;
- bnRequired.SetCompact(ComputeMinWork(pcheckpoint->nBits, deltaTime));
- if (fOverflow || bnNewBlock > bnRequired)
+ if (!CheckMinWork(block.nBits, pcheckpoint->nBits, deltaTime))
{
return state.DoS(100, error("CheckBlockHeader() : block with too little proof-of-work"),
REJECT_INVALID, "bad-diffbits");