Move stake mining function wrapper definition to miner.cpp. Also, init NTP thread...
[novacoin.git] / src / init.cpp
index 9655f2a..1eb28a5 100644 (file)
@@ -8,7 +8,6 @@
 #include "net.h"
 #include "init.h"
 #include "util.h"
-#include "ntp.h"
 #include "ui_interface.h"
 #include "checkpoints.h"
 #include <boost/format.hpp>
@@ -996,33 +995,6 @@ bool AppInit2()
     if (fServer)
         NewThread(ThreadRPCServer, NULL);
 
-    // ********************************************************* Step 12: NTP synchronization
-
-    // First, do a simple check whether there is a local ntp server.
-    string strLocalHost = "127.0.0.1";
-    int64_t nTime = NtpGetTime(strLocalHost);
-
-    if (nTime < 0 || nTime != GetTime()) {
-        // If not, then request current timestamp from three random NTP servers.
-        uiInterface.InitMessage(_("Synchronizing time through NTP..."));
-        printf("Synchronizing time through NTP...\n");
-
-        for(int i = 0; i < 2; i++) {
-            CNetAddr ip;
-            int64_t nTime = NtpGetTime(ip);
-
-            if (nTime > 0 && nTime != 2085978496) { // Skip the deliberately wrong timestamps
-                AddTimeData(ip, nTime);
-                printf("AddTimeData(%s, %" PRId64 ")\n", ip.ToString().c_str(), nTime);
-            }
-        }
-
-        // When done, start a periodical sampling thread
-        NewThread(ThreadNtpSamples, NULL);
-
-        uiInterface.InitMessage(_("Done"));
-        printf("Done\n");
-    }
     // ********************************************************* Step 12: finished
 
     uiInterface.InitMessage(_("Done loading"));