Skip to content
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.

Commit

Permalink
add option -synctime and disable it by default
Browse files Browse the repository at this point in the history
  • Loading branch information
recursive-rat4 committed May 4, 2016
1 parent c69b533 commit 0b5a44b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-whitebind=<addr>", _("Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6"));
strUsage += HelpMessageOpt("-whitelist=<netmask>", _("Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.") +
" " + _("Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway"));
strUsage += HelpMessageOpt("-synctime", strprintf(_("Sync time with other nodes (default: %u)"), 0));


#ifdef ENABLE_WALLET
Expand Down
4 changes: 3 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4193,7 +4193,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,

int64_t nTimeOffset = nTime - GetTime();
pfrom->nTimeOffset = nTimeOffset;
AddTimeData(pfrom->addr, nTimeOffset);

if (GetBoolArg("-synctime", false))
AddTimeData(pfrom->addr, nTimeOffset);
}


Expand Down

0 comments on commit 0b5a44b

Please sign in to comment.