diff options
| author | jtimon <[email protected]> | 2014-03-10 08:46:53 -0700 |
|---|---|---|
| committer | jtimon <[email protected]> | 2014-06-23 23:10:24 +0200 |
| commit | df852d2bcc6573a3fcb3e59f82f7ea4dfa11290e (patch) | |
| tree | f8651a97cf4617ce0a867f964f5c70b0f2bf8090 /src/txdb.cpp | |
| parent | Merge pull request #4395 (diff) | |
| download | discoin-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.cpp | 5 |
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 { |