add more information to dropped vote warning (#4449)
* add more information to dropped vote warning * fixup
This commit is contained in:
parent
0e26ee854b
commit
ff31ffbd54
|
@ -145,10 +145,22 @@ impl VoteState {
|
|||
.iter()
|
||||
.any(|(slot, hash)| vote.slot == *slot && vote.hash == *hash)
|
||||
{
|
||||
warn!(
|
||||
"dropping vote {:?}, no matching slot/hash combination",
|
||||
vote
|
||||
);
|
||||
if log_enabled!(log::Level::Warn) {
|
||||
for (slot, hash) in slot_hashes {
|
||||
if vote.slot == *slot {
|
||||
warn!(
|
||||
"dropped vote {:?} matched slot {}, but not hash {:?}",
|
||||
vote, *slot, *hash
|
||||
);
|
||||
}
|
||||
if vote.hash == *hash {
|
||||
warn!(
|
||||
"dropped vote {:?} matched hash {:?}, but not slot {}",
|
||||
vote, *hash, *slot,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue