Add dropped vote metrics (#11009)

This commit is contained in:
sakridge
2020-07-13 09:11:07 -07:00
committed by GitHub
parent de379a8cd6
commit 1880621740

View File

@@ -312,6 +312,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 {
@@ -319,6 +320,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(())