Skip to content

Commit

Permalink
Include the current round time in the average round time computation
Browse files Browse the repository at this point in the history
  • Loading branch information
ximinez committed Feb 28, 2025
1 parent 440499f commit c82e73e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xrpld/app/misc/detail/TxQ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ TxQ::FeeMetrics::update(

using namespace std::chrono;

if (roundTime)
recentRoundTimes_.push_back(*roundTime);
milliseconds const averageTime = recentRoundTimes_.empty()
? 0ms
: milliseconds{
Expand All @@ -110,8 +112,6 @@ TxQ::FeeMetrics::update(
bool const timeLeap = !roundTime ||
(roundTime > timeLeapCutoff &&
roundTime > averageTime * timeLeapFactor);
if (roundTime)
recentRoundTimes_.push_back(*roundTime);

JLOG((timeLeap ? j_.warn() : j_.debug()))
<< "Ledger " << view.info().seq << " has " << size << " transactions. "
Expand Down

0 comments on commit c82e73e

Please sign in to comment.