mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Improve amendment processing and activation logic:
* The amendment ballot counting code contained a minor technical flaw, caused by the use of integer arithmetic and rounding semantics, that could allow amendments to reach majority with slightly less than 80% support. This commit introduces an amendment which, if enabled, will ensure that activation requires at least 80% support. * This commit also introduces a configuration option to adjust the amendment activation hysteresis. This option is useful on test networks, but should not be used on the main network as is a network-wide consensus parameter that should not be changed on a per-server basis; doing so can result in a hard-fork. Fixes #3396
This commit is contained in:
committed by
Nik Bougalis
parent
fe9922d654
commit
df29e98ea5
@@ -77,9 +77,6 @@
|
||||
|
||||
namespace ripple {
|
||||
|
||||
// 204/256 about 80%
|
||||
static int const MAJORITY_FRACTION(204);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace detail {
|
||||
@@ -1533,8 +1530,7 @@ ApplicationImp::setup()
|
||||
Section enabledAmendments = config_->section(SECTION_AMENDMENTS);
|
||||
|
||||
m_amendmentTable = make_AmendmentTable(
|
||||
weeks{2},
|
||||
MAJORITY_FRACTION,
|
||||
config().AMENDMENT_MAJORITY_TIME,
|
||||
supportedAmendments,
|
||||
enabledAmendments,
|
||||
config_->section(SECTION_VETO_AMENDMENTS),
|
||||
|
||||
Reference in New Issue
Block a user