Enable Amendments from config file or static data (RIPD-746):

* The rippled.cfg file has a new section called "amendments"

* Each line in this section contains two white-space separated items
** The first item is the ID of the amendment (a 256-bit hash)
** The second item is the friendly name

* Replaces config section name macros with variables

* Make addKnown arguments safer

* Added lock to addKnown
This commit is contained in:
Scott Determan
2015-01-09 09:49:18 -05:00
committed by Nik Bougalis
parent 312aec79ca
commit 44450bf644
8 changed files with 765 additions and 138 deletions

View File

@@ -50,6 +50,7 @@
#include <ripple/json/json_reader.h>
#include <ripple/json/to_string.h>
#include <ripple/core/LoadFeeTrack.h>
#include <ripple/core/ConfigSections.h>
#include <ripple/net/SNTPClient.h>
#include <ripple/nodestore/Database.h>
#include <ripple/nodestore/DummyScheduler.h>
@@ -317,8 +318,9 @@ public:
, 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")))
, m_amendmentTable (make_AmendmentTable
(weeks(2), MAJORITY_FRACTION,
m_logs.journal("AmendmentTable")))
, mFeeTrack (LoadFeeTrack::New (m_logs.journal("LoadManager")))
@@ -650,7 +652,8 @@ public:
if (!getConfig ().RUN_STANDALONE)
updateTables ();
m_amendmentTable->addInitial();
m_amendmentTable->addInitial (
getConfig ().section (SECTION_AMENDMENTS));
initializePathfinding ();
m_ledgerMaster->setMinValidations (getConfig ().VALIDATION_QUORUM);