mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Validators work (RIPD-703):
This replaces the experimental validators module with foundational code to implement a new system for tracking validators, validations and the UNL. The code is turned off by default, in BeastConfig.h * Remove obsolete public Manager interfaces * Remove obsolete database methods * Remove obsolete ChosenList concept * Remove obsolete code * Add missing includes * Tidy up STValidation.h * Move factory function to Validators::make_Manager * Add Connection object for tracking STValidations
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
#include <ripple/rpc/Manager.h>
|
||||
#include <ripple/server/make_ServerHandler.h>
|
||||
#include <ripple/sitefiles/Sitefiles.h>
|
||||
#include <ripple/validators/Manager.h>
|
||||
#include <ripple/validators/make_Manager.h>
|
||||
#include <beast/asio/io_latency_probe.h>
|
||||
#include <beast/module/core/thread/DeadlineTimer.h>
|
||||
#include <boost/asio/signal_set.hpp>
|
||||
@@ -318,10 +318,8 @@ public:
|
||||
|
||||
, m_sntpClient (SNTPClient::New (*this))
|
||||
|
||||
, m_validators (add (Validators::Manager::New (
|
||||
*this,
|
||||
getConfig ().getModuleDatabasePath (),
|
||||
m_logs.journal("Validators"))))
|
||||
, m_validators (Validators::make_Manager(*this, get_io_service(),
|
||||
getConfig ().getModuleDatabasePath (), m_logs.journal("UVL")))
|
||||
|
||||
, m_amendmentTable (make_AmendmentTable (weeks(2), MAJORITY_FRACTION,
|
||||
m_logs.journal("AmendmentTable")))
|
||||
@@ -365,6 +363,7 @@ public:
|
||||
// VFALCO HACK
|
||||
m_nodeStoreScheduler.setJobQueue (*m_jobQueue);
|
||||
|
||||
add (*m_validators);
|
||||
add (m_ledgerMaster->getPropertySource ());
|
||||
add (*serverHandler_);
|
||||
}
|
||||
@@ -787,28 +786,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
// Initialize the Validators object with Config information.
|
||||
void prepareValidators ()
|
||||
{
|
||||
m_validators->addStrings ("rippled.cfg", getConfig().validators);
|
||||
|
||||
if (! getConfig().getValidatorsURL().empty())
|
||||
m_validators->addURL (getConfig().getValidatorsURL());
|
||||
|
||||
if (getConfig().getValidatorsFile() != beast::File::nonexistent ())
|
||||
m_validators->addFile (getConfig().getValidatorsFile());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
//
|
||||
// Stoppable
|
||||
//
|
||||
|
||||
void onPrepare ()
|
||||
void onPrepare() override
|
||||
{
|
||||
prepareValidators ();
|
||||
}
|
||||
|
||||
void onStart ()
|
||||
|
||||
Reference in New Issue
Block a user