mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-05 08:48:03 +00:00
Set quorum to tolerate 2 failures for validator list of 6 members.
This commit is contained in:
@@ -573,7 +573,7 @@ ValidatorList::calculateMinimumQuorum (
|
||||
{
|
||||
// Only require 51% quorum for small number of validators to facilitate
|
||||
// bootstrapping a network.
|
||||
if (nListedKeys <= 5)
|
||||
if (nListedKeys <= 6)
|
||||
return nListedKeys/2 + 1;
|
||||
|
||||
// The number of listed validators is increased to preserve the safety
|
||||
|
||||
@@ -834,8 +834,8 @@ private:
|
||||
emptyLocalKey, cfgKeys, cfgPublishers));
|
||||
trustedKeys->onConsensusStart (activeValidators);
|
||||
BEAST_EXPECT(trustedKeys->quorum () ==
|
||||
(cfgKeys.size() <= 5) ? cfgKeys.size()/2 + 1 :
|
||||
cfgKeys.size() * 2/3 + 1);
|
||||
((cfgKeys.size() <= 6) ? cfgKeys.size()/2 + 1 :
|
||||
cfgKeys.size() * 2/3 + 1));
|
||||
for (auto const& key : activeValidators)
|
||||
BEAST_EXPECT(trustedKeys->trusted (key));
|
||||
}
|
||||
@@ -865,8 +865,8 @@ private:
|
||||
trustedKeys->onConsensusStart (activeValidators);
|
||||
|
||||
BEAST_EXPECT(trustedKeys->quorum () ==
|
||||
(cfgKeys.size() <= 5) ? cfgKeys.size()/2 + 1 :
|
||||
(cfgKeys.size() + 1) * 2/3 + 1);
|
||||
((cfgKeys.size() <= 6) ? cfgKeys.size()/2 + 1 :
|
||||
(cfgKeys.size() + 1) * 2/3 + 1));
|
||||
|
||||
for (auto const& key : activeValidators)
|
||||
BEAST_EXPECT(trustedKeys->trusted (key));
|
||||
|
||||
Reference in New Issue
Block a user