aboutsummaryrefslogtreecommitdiff
path: root/src/txdb.cpp
diff options
context:
space:
mode:
authorjtimon <jtimon@monetize.io>2014-03-10 08:46:53 -0700
committerjtimon <jtimon@monetize.io>2014-06-23 23:10:24 +0200
commitdf852d2bcc6573a3fcb3e59f82f7ea4dfa11290e (patch)
treef8651a97cf4617ce0a867f964f5c70b0f2bf8090 /src/txdb.cpp
parent36db6633c314b0f41aeee856f74a8d5d59334dbb (diff)
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 4eab8525a5..92137f71ff 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 {