mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-05 01:37:00 +00:00
fix(telemetry): avoid double-counting consensus_txset ledger mismatches
handleMismatch() recorded the "consensus_txset" reason but then fell through
to the transaction-level comparison, which also recorded a reason
("same_txset_diff_result" / "different_txset"). A single mismatch with
disagreeing consensus tx-set hashes therefore incremented
xrpld_ledger_history_mismatch_total twice across two reason labels, so the
sum over reason exceeded the real mismatch count.
The consensus tx-set hash disagreement is the root cause; return after
recording it so each mismatch contributes exactly one reason.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -377,11 +377,15 @@ LedgerHistory::handleMismatch(
|
||||
JLOG(j_.error()) << "MISMATCH on consensus transaction set "
|
||||
<< " built: " << to_string(*builtConsensusHash)
|
||||
<< " validated: " << to_string(*validatedConsensusHash);
|
||||
// The consensus tx-set hashes disagree — this is the root cause,
|
||||
// so record it as the single reason and stop. The tx-level
|
||||
// comparison below would otherwise double-count the same mismatch.
|
||||
recordReason("consensus_txset");
|
||||
return;
|
||||
}
|
||||
else
|
||||
JLOG(j_.error()) << "MISMATCH with same consensus transaction set: "
|
||||
<< to_string(*builtConsensusHash);
|
||||
|
||||
JLOG(j_.error()) << "MISMATCH with same consensus transaction set: "
|
||||
<< to_string(*builtConsensusHash);
|
||||
}
|
||||
|
||||
// Find differences between built and valid ledgers
|
||||
|
||||
Reference in New Issue
Block a user