Add dropped vote metrics (#11009) (#11030)

(cherry picked from commit 1880621740)

Co-authored-by: sakridge <sakridge@gmail.com>
This commit is contained in:
mergify[bot]
2020-07-14 15:21:49 -07:00
committed by GitHub
parent 121418dad2
commit fde85c96c0

View File

@ -307,6 +307,7 @@ 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 {
@ -314,6 +315,7 @@ impl VoteState {
"{} 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(())