Skip to content

Commit

Permalink
Vote not stuck disputed transactions in an edge case:
Browse files Browse the repository at this point in the history
  • Loading branch information
ximinez committed Feb 5, 2025
1 parent c7338a5 commit f07992d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/xrpld/consensus/ConsensusParms.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ struct ConsensusParms
//! Percentage of nodes that must vote yes after we are stuck
std::size_t avSTUCK_CONSENSUS_PCT = 95;

//! Percentage of previous round duration before we are frozen
std::size_t avFROZEN_CONSENSUS_TIME = 400;

//! Percentage of nodes required to reach agreement on ledger close time
std::size_t avCT_CONSENSUS_PCT = 75;
};
Expand Down
4 changes: 3 additions & 1 deletion src/xrpld/consensus/DisputedTx.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,10 @@ DisputedTx<Tx_t, NodeID_t>::updateVote(
newPosition = weight > p.avMID_CONSENSUS_PCT;
else if (percentTime < p.avSTUCK_CONSENSUS_TIME)
newPosition = weight > p.avLATE_CONSENSUS_PCT;
else
else if (percentTime < p.avFROZEN_CONSENSUS_TIME)
newPosition = weight > p.avSTUCK_CONSENSUS_PCT;
else
newPosition = false;

Check warning on line 232 in src/xrpld/consensus/DisputedTx.h

View check run for this annotation

Codecov / codecov/patch

src/xrpld/consensus/DisputedTx.h#L232

Added line #L232 was not covered by tests
}
else
{
Expand Down

0 comments on commit f07992d

Please sign in to comment.