Skip to content

Commit

Permalink
Fix processing metrics (near#12465)
Browse files Browse the repository at this point in the history
Slight glitch, `processing_state.local_receipts` will be empty after
`take()`, so `local_receipt_count` is always 0, obviously not the
intent.
  • Loading branch information
eagr authored Nov 15, 2024
1 parent dcb67cb commit bd73c72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1717,8 +1717,8 @@ impl Runtime {
validator_proposals: &mut Vec<ValidatorStake>,
) -> Result<(), RuntimeError> {
let local_processing_start = std::time::Instant::now();
let local_receipts = std::mem::take(&mut processing_state.local_receipts);
let local_receipt_count = processing_state.local_receipts.len();
let local_receipts = std::mem::take(&mut processing_state.local_receipts);
if let Some(prefetcher) = &mut processing_state.prefetcher {
// Prefetcher is allowed to fail
let (front, back) = local_receipts.as_slices();
Expand Down

0 comments on commit bd73c72

Please sign in to comment.