Skip to content

Commit 151f2d0

Browse files
committed
Revert try_into().unwrap() cast, keep as i64 for metrics setter
A panic in a metrics setter is worse than a theoretical silent wrap on a value that will never exceed i64::MAX in practice.
1 parent f357438 commit 151f2d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/blockchain/src/metrics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ pub fn set_attestation_committee_count(count: u64) {
368368
)
369369
.unwrap()
370370
});
371-
LEAN_ATTESTATION_COMMITTEE_COUNT.set(count.try_into().unwrap());
371+
LEAN_ATTESTATION_COMMITTEE_COUNT.set(count as i64);
372372
}
373373

374374
/// Observe the depth of a fork choice reorg.

0 commit comments

Comments
 (0)