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:
Vinnie Falco
2014-11-18 15:43:33 -08:00
parent 628e3ac1eb
commit 2f6af906f4
38 changed files with 666 additions and 3040 deletions

View File

@@ -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 ()