mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Persist API-configured voting settings:
Prior to this commit, the amendments that a server would vote in support of or against could be configured both via the configuration file and via the command line "feature" command. Changes made in the configuration file would only be loaded once at server startup and changes made via the command line take effect immediately but are not persisted across restarts. This commit deprecates management of amendments via the configuration file and stores the relevant information in the `wallet.db` database file. 1. On startup, the new code parses the configuration file. 2. If the `[veto_amendments]` or `[amendments]` sections are present, we check if the `FeatureVotes` table is present in `wallet.db`. 3. If it is not, we create the `FeatureVotes` table and transfer the settings from the config file. 4. Proceed normally but only reference the `FeatureVotes` table instead of the config file. 5. Warns if the voting table already exists in `wallet.db` and there exists voting sections in the config file. The config file is ignored in this case. This change addresses & closes #3366
This commit is contained in:
committed by
Nik Bougalis
parent
24b17c6de9
commit
28ed2b9e69
@@ -1360,6 +1360,7 @@ ApplicationImp::setup()
|
||||
Section enabledAmendments = config_->section(SECTION_AMENDMENTS);
|
||||
|
||||
m_amendmentTable = make_AmendmentTable(
|
||||
*this,
|
||||
config().AMENDMENT_MAJORITY_TIME,
|
||||
supportedAmendments,
|
||||
enabledAmendments,
|
||||
|
||||
Reference in New Issue
Block a user