Don't close database during proof-of-stake checking
authoralex <alex@alex-VirtualBox.(none)>
Sun, 25 Aug 2013 22:44:29 +0000 (02:44 +0400)
committeralex <alex@alex-VirtualBox.(none)>
Sun, 25 Aug 2013 22:44:29 +0000 (02:44 +0400)
src/kernel.cpp

index fe3b0f6..645905f 100644 (file)
@@ -360,7 +360,10 @@ bool CheckProofOfStake(const CTransaction& tx, unsigned int nBits, uint256& hash
     CTxIndex txindex;
     if (!txPrev.ReadFromDisk(txdb, txin.prevout, txindex))
         return tx.DoS(1, error("CheckProofOfStake() : INFO: read txPrev failed"));  // previous transaction not in main chain, may occur during initial download
+
+#ifndef USE_LEVELDB
     txdb.Close();
+#endif
 
     // Verify signature
     if (!VerifySignature(txPrev, tx, 0, true, 0))