Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Add dropped vote metrics (#11009)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakridge authored Jul 13, 2020
1 parent de379a8 commit 1880621
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions programs/vote/src/vote_state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,15 @@ impl VoteState {
"{} dropped vote {:?} failed to match slot: {:?}",
self.node_pubkey, vote, slot_hashes,
);
inc_new_counter_info!("dropped-vote-slot", 1);
return Err(VoteError::SlotsMismatch);
}
if slot_hashes[j].1 != vote.hash {
warn!(
"{} dropped vote {:?} failed to match hash {} {}",
self.node_pubkey, vote, vote.hash, slot_hashes[j].1
);
inc_new_counter_info!("dropped-vote-hash", 1);
return Err(VoteError::SlotHashMismatch);
}
Ok(())
Expand Down

0 comments on commit 1880621

Please sign in to comment.