PPCoin: Reset sync-checkpoint when checkpoint master key changes
[novacoin.git] / src / main.cpp
index 3598c4a..4409dd2 100644 (file)
@@ -1843,11 +1843,8 @@ bool LoadBlockIndex(bool fAllowNew)
             return error("LoadBlockIndex() : genesis block not accepted");
 
         // ppcoin: initialize synchronized checkpoint
-        CTxDB txdbc;
-        if (!txdbc.WriteSyncCheckpoint(hashGenesisBlock))
+        if (!Checkpoints::WriteSyncCheckpoint(hashGenesisBlock))
             return error("LoadBlockIndex() : failed to init sync checkpoint");
-        txdbc.Close();
-        Checkpoints::hashSyncCheckpoint = hashGenesisBlock;
     }
 
     return true;