Skip to content

Commit

Permalink
Remove SNTP code
Browse files Browse the repository at this point in the history
Fixes: XRPLF#4207

Make SNTPClock a simple wrapper around abstract_clock<system_clock>
  • Loading branch information
HowardHinnant committed Aug 18, 2022
1 parent e5275b8 commit 6c239bd
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 505 deletions.
14 changes: 0 additions & 14 deletions cfg/rippled-example.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -460,20 +460,6 @@
# place a space after the public key and then the name.
#
#
#
# [sntp_servers]
#
# IP address or domain of NTP servers to use for time synchronization.
#
# These NTP servers are suitable for rippled servers located in the United
# States:
# time.windows.com
# time.apple.com
# time.nist.gov
# pool.ntp.org
#
#
#
# [max_transactions]
#
# Configure the maximum number of transactions to have in the job queue
Expand Down
14 changes: 0 additions & 14 deletions cfg/rippled-reporting.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -449,20 +449,6 @@
# place a space after the public key and then the name.
#
#
#
# [sntp_servers]
#
# IP address or domain of NTP servers to use for time synchronization.
#
# These NTP servers are suitable for rippled servers located in the United
# States:
# time.windows.com
# time.apple.com
# time.nist.gov
# pool.ntp.org
#
#
#
# [max_transactions]
#
# Configure the maximum number of transactions to have in the job queue
Expand Down
3 changes: 0 additions & 3 deletions src/ripple/app/main/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1158,9 +1158,6 @@ ApplicationImp::setup()
// Optionally turn off logging to console.
logs_->silent(config_->silent());

if (!config_->standalone())
timeKeeper_->run(config_->SNTP_SERVERS);

if (!initRelationalDatabase() || !initNodeStore())
return false;

Expand Down
5 changes: 2 additions & 3 deletions src/ripple/core/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,8 @@ class Config : public BasicConfig
bool nodeToShard = false;
bool ELB_SUPPORT = false;

std::vector<std::string> IPS; // Peer IPs from rippled.cfg.
std::vector<std::string> IPS_FIXED; // Fixed Peer IPs from rippled.cfg.
std::vector<std::string> SNTP_SERVERS; // SNTP servers from rippled.cfg.
std::vector<std::string> IPS; // Peer IPs from rippled.cfg.
std::vector<std::string> IPS_FIXED; // Fixed Peer IPs from rippled.cfg.

enum StartUpType { FRESH, NORMAL, LOAD, LOAD_FILE, REPLAY, NETWORK };
StartUpType START_UP = NORMAL;
Expand Down
1 change: 0 additions & 1 deletion src/ripple/core/ConfigSections.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ struct ConfigSection
#define SECTION_RELAY_VALIDATIONS "relay_validations"
#define SECTION_RPC_STARTUP "rpc_startup"
#define SECTION_SIGNING_SUPPORT "signing_support"
#define SECTION_SNTP "sntp_servers"
#define SECTION_SSL_VERIFY "ssl_verify"
#define SECTION_SSL_VERIFY_FILE "ssl_verify_file"
#define SECTION_SSL_VERIFY_DIR "ssl_verify_dir"
Expand Down
8 changes: 0 additions & 8 deletions src/ripple/core/TimeKeeper.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ class TimeKeeper : public beast::abstract_clock<NetClock>
public:
virtual ~TimeKeeper() = default;

/** Launch the internal thread.
The internal thread synchronizes local network time
using the provided list of SNTP servers.
*/
virtual void
run(std::vector<std::string> const& servers) = 0;

/** Returns the estimate of wall time, in network time.
The network time is wall time adjusted for the Ripple
Expand Down
3 changes: 0 additions & 3 deletions src/ripple/core/impl/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,6 @@ Config::loadFromString(std::string const& fileContents)
if (auto s = getIniFileSection(secConfig, SECTION_IPS_FIXED))
IPS_FIXED = *s;

if (auto s = getIniFileSection(secConfig, SECTION_SNTP))
SNTP_SERVERS = *s;

{
std::string dbPath;
if (getSingleSection(secConfig, "database_path", dbPath, j_))
Expand Down
Loading

0 comments on commit 6c239bd

Please sign in to comment.