Permalink
Browse files

Add startup switch -synctime

Allows you to not sync time with peers if you are using precise time.
Default on.
  • Loading branch information...
Tranz5 committed Jul 13, 2014
1 parent e781bb9 commit ded4b5104e91bc74c4331471c0755c5b8adb50db
Showing with 3 additions and 1 deletion.
  1. +1 −0 src/init.cpp
  2. +2 −1 src/main.cpp
View
@@ -254,6 +254,7 @@ std::string HelpMessage()
" -listen " + _("Accept connections from outside (default: 1 if no -proxy or -connect)") + "\n" +
" -bind=<addr> " + _("Bind to given address. Use [host]:port notation for IPv6") + "\n" +
" -dnsseed " + _("Find peers using DNS lookup (default: 0)") + "\n" +
" -synctime " + _("Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)") + "\n" +
" -cppolicy " + _("Sync checkpoints policy (default: strict)") + "\n" +
" -banscore=<n> " + _("Threshold for disconnecting misbehaving peers (default: 100)") + "\n" +
" -bantime=<n> " + _("Number of seconds to keep misbehaving peers from reconnecting (default: 86400)") + "\n" +
View
@@ -3157,7 +3157,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
pfrom->fClient = !(pfrom->nServices & NODE_NETWORK);
AddTimeData(pfrom->addr, nTime);
if (GetBoolArg("-synctime", true))
AddTimeData(pfrom->addr, nTime);
// Change version
pfrom->PushMessage("verack");

0 comments on commit ded4b51

Please sign in to comment.