PPCoin: Fix bug in CBlock::ReadFromDisk() since 94ced845
authorSunny King <sunnyking9999@gmail.com>
Fri, 27 Apr 2012 02:57:59 +0000 (03:57 +0100)
committerSunny King <sunnyking9999@gmail.com>
Fri, 27 Apr 2012 02:57:59 +0000 (03:57 +0100)
        ERROR: CBlock::ReadFromDisk() : errors in block header
        ERROR: CheckProofOfWork() : hash doesn't match nBits

src/main.h

index 6244695..bd07ceb 100644 (file)
@@ -1004,7 +1004,7 @@ public:
         filein >> *this;
 
         // Check the header
-        if (IsProofOfWork() && !CheckProofOfWork(GetHash(), nBits))
+        if (fReadTransactions && IsProofOfWork() && !CheckProofOfWork(GetHash(), nBits))
             return error("CBlock::ReadFromDisk() : errors in block header");
 
         return true;