aboutsummaryrefslogtreecommitdiff
path: root/src/txdb.cpp
diff options
context:
space:
mode:
authorjtimon <[email protected]>2014-03-10 08:46:53 -0700
committerjtimon <[email protected]>2014-06-23 23:10:24 +0200
commitdf852d2bcc6573a3fcb3e59f82f7ea4dfa11290e (patch)
treef8651a97cf4617ce0a867f964f5c70b0f2bf8090 /src/txdb.cpp
parentMerge pull request #4395 (diff)
downloaddiscoin-df852d2bcc6573a3fcb3e59f82f7ea4dfa11290e.tar.xz
discoin-df852d2bcc6573a3fcb3e59f82f7ea4dfa11290e.zip
Refactor proof of work related functions out of main
Diffstat (limited to 'src/txdb.cpp')
-rw-r--r--src/txdb.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 4eab8525a..92137f71f 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -6,6 +6,7 @@
#include "txdb.h"
#include "core.h"
+#include "pow.h"
#include "uint256.h"
#include <stdint.h>
@@ -212,8 +213,8 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
pindexNew->nStatus = diskindex.nStatus;
pindexNew->nTx = diskindex.nTx;
- if (!pindexNew->CheckIndex())
- return error("LoadBlockIndex() : CheckIndex failed: %s", pindexNew->ToString());
+ if (!CheckProofOfWork(pindexNew->GetBlockHash(), pindexNew->nBits))
+ return error("LoadBlockIndex() : CheckProofOfWork failed: %s", pindexNew->ToString());
pcursor->Next();
} else {