mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 14:35:52 +00:00
Change rule slightly if consensus seems stuck.
This commit is contained in:
@@ -248,8 +248,10 @@ bool LCTransaction::updateVote(int percentTime, bool proposing)
|
|||||||
newPosition = weight > AV_INIT_CONSENSUS_PCT;
|
newPosition = weight > AV_INIT_CONSENSUS_PCT;
|
||||||
else if (percentTime < AV_LATE_CONSENSUS_TIME)
|
else if (percentTime < AV_LATE_CONSENSUS_TIME)
|
||||||
newPosition = weight > AV_MID_CONSENSUS_PCT;
|
newPosition = weight > AV_MID_CONSENSUS_PCT;
|
||||||
else
|
else if (percentTime < AV_STUCK_CONSENSUS_TIME)
|
||||||
newPosition = weight > AV_LATE_CONSENSUS_PCT;
|
newPosition = weight > AV_LATE_CONSENSUS_PCT;
|
||||||
|
else
|
||||||
|
newPosition = weight > AV_STUCK_CONSENSUS_PCT;
|
||||||
}
|
}
|
||||||
else // don't let us outweigh a proposing node, just recognize consensus
|
else // don't let us outweigh a proposing node, just recognize consensus
|
||||||
{
|
{
|
||||||
@@ -764,8 +766,10 @@ void LedgerConsensus::updateOurPositions()
|
|||||||
neededWeight = AV_INIT_CONSENSUS_PCT;
|
neededWeight = AV_INIT_CONSENSUS_PCT;
|
||||||
else if (mClosePercent < AV_LATE_CONSENSUS_TIME)
|
else if (mClosePercent < AV_LATE_CONSENSUS_TIME)
|
||||||
neededWeight = AV_MID_CONSENSUS_PCT;
|
neededWeight = AV_MID_CONSENSUS_PCT;
|
||||||
else
|
else if (mClosePercent < AV_STUCK_CONSENSUS_TIME)
|
||||||
neededWeight = AV_LATE_CONSENSUS_PCT;
|
neededWeight = AV_LATE_CONSENSUS_PCT;
|
||||||
|
else
|
||||||
|
neededWeight = AV_STUCK_CONSENSUS_TIME;
|
||||||
|
|
||||||
uint32 closeTime = 0;
|
uint32 closeTime = 0;
|
||||||
mHaveCloseTimeConsensus = false;
|
mHaveCloseTimeConsensus = false;
|
||||||
|
|||||||
@@ -47,6 +47,9 @@
|
|||||||
#define AV_LATE_CONSENSUS_TIME 85 // percentage of previous close time before we advance
|
#define AV_LATE_CONSENSUS_TIME 85 // percentage of previous close time before we advance
|
||||||
#define AV_LATE_CONSENSUS_PCT 70 // percentage of nodes that most vote yes after advancing
|
#define AV_LATE_CONSENSUS_PCT 70 // percentage of nodes that most vote yes after advancing
|
||||||
|
|
||||||
|
#define AV_STUCK_CONSENSUS_TIME 200
|
||||||
|
#define AC_STUCK_CONSENSUS_PCT 95
|
||||||
|
|
||||||
|
|
||||||
class ContinuousLedgerTiming
|
class ContinuousLedgerTiming
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user