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

add more information to dropped vote warning #4449

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions programs/vote_api/src/vote_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down