CScriptCheck : Add initializers
[novacoin.git] / src / init.cpp
index 50a79ac..6689169 100644 (file)
@@ -81,7 +81,7 @@ void Shutdown(void* parg)
             fTaken = true;
         }
     }
-    static bool fExit;
+    volatile static bool fExit;
     if (fFirstThread)
     {
         fShutdown = true;
@@ -342,16 +342,15 @@ bool DropBlockIndex()
         }
         return true;
     }
-    catch(std::exception &e)
+    catch(const std::exception&)
     {
         // TODO: report error here
         return false;
     }
 }
 
-/** Initialize bitcoin.
- *  @pre Parameters should be parsed and config file should be read.
- */
+// Initialize bitcoin.
+//  @pre Parameters should be parsed and config file should be read.
 bool AppInit2()
 {
     // ********************************************************* Step 1: setup
@@ -413,19 +412,19 @@ bool AppInit2()
     // Ping and address broadcast intervals
     nPingInterval = max<int64_t>(10 * 60, GetArg("-keepalive", 30 * 60));
 
-    CheckpointsMode = Checkpoints::STRICT;
+    CheckpointsMode = Checkpoints::CP_STRICT;
     auto strCpMode = GetArg("-cppolicy", "strict");
 
     if(strCpMode == "strict") {
-        CheckpointsMode = Checkpoints::STRICT;
+        CheckpointsMode = Checkpoints::CP_STRICT;
     }
 
     if(strCpMode == "advisory") {
-        CheckpointsMode = Checkpoints::ADVISORY;
+        CheckpointsMode = Checkpoints::CP_ADVISORY;
     }
 
     if(strCpMode == "permissive") {
-        CheckpointsMode = Checkpoints::PERMISSIVE;
+        CheckpointsMode = Checkpoints::CP_PERMISSIVE;
     }
 
     fTestNet = GetBoolArg("-testnet");
@@ -709,7 +708,6 @@ bool AppInit2()
     bool fBound = false;
     if (!fNoListen)
     {
-        std::string strError;
         if (mapArgs.count("-bind")) {
             for(std::string strBind :  mapMultiArgs["-bind"]) {
                 CService addrBind;