X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Finit.cpp;h=4a9e19d1046d9fcee5d2cefaa17f8a48a305df8b;hp=9655f2a290905a74871dd54389425685d15e4ab7;hb=b60dd5749ca05390bceaf3256efc2a036a91f2e8;hpb=7b1fc4e89eec43568d7ac94d4f30e50cee1d52ab diff --git a/src/init.cpp b/src/init.cpp index 9655f2a..4a9e19d 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -998,31 +998,12 @@ bool AppInit2() // ********************************************************* 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); - } - } + // Trusted NTP server, it's localhost by default. + strTrustedUpstream = GetArg("-ntp", "localhost"); - // When done, start a periodical sampling thread - NewThread(ThreadNtpSamples, NULL); + // Start periodical NTP sampling thread + NewThread(ThreadNtpSamples, NULL); - uiInterface.InitMessage(_("Done")); - printf("Done\n"); - } // ********************************************************* Step 12: finished uiInterface.InitMessage(_("Done loading"));