Skip to content

Commit 6ef4a4b

Browse files
committed
[watcher] trim comment + metric help to crate style
1 parent efd99f9 commit 6ef4a4b

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

crates/hashi/src/metrics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ impl Metrics {
356356
.unwrap(),
357357
guardian_limiter_anchor_events_skipped_total: register_int_counter_with_registry!(
358358
"hashi_guardian_limiter_anchor_events_skipped_total",
359-
"WithdrawalSignedEvent observations skipped because signatures were already recorded — covers checkpoint-stream redelivery and bootstrap-replay events",
359+
"WithdrawalSignedEvent observations skipped as duplicates (checkpoint redelivery or bootstrap replay)",
360360
registry,
361361
)
362362
.unwrap(),

crates/hashi/src/onchain/watcher.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -451,14 +451,10 @@ async fn handle_events(
451451
// Advance uses the event's checkpoint timestamp (~sign-time)
452452
// rather than `txn.timestamp_ms` (creation time) to stay in
453453
// lockstep with the guardian's `last_updated_at`.
454-
//
455-
// `signatures.is_some()` doubles as a "have we already
456-
// accounted for this txn?" flag, set on the first apply
457-
// here and by `scrape_hashi` at bootstrap. It keeps the
458-
// limiter idempotent if `SubscribeCheckpoints` redelivers
459-
// a checkpoint, and it also skips historical events that
460-
// the bootstrap snapshot already counted via the
461-
// guardian's `next_seq`.
454+
// `signatures.is_some()` makes the apply idempotent — set
455+
// here on the first observation and by `scrape_hashi` at
456+
// bootstrap, so checkpoint redelivery and bootstrap-replay
457+
// events are skipped.
462458
let (limiter_inputs, pick_to_sign_ms) = {
463459
let mut state = state.state_mut();
464460
state

0 commit comments

Comments
 (0)