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

Commit

Permalink
add more information to dropped vote warning (#4449)
Browse files Browse the repository at this point in the history
* add more information to dropped vote warning

* fixup
  • Loading branch information
rob-solana authored May 28, 2019
1 parent 0e26ee8 commit ff31ffb
Showing 1 changed file with 16 additions and 4 deletions.
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

0 comments on commit ff31ffb

Please sign in to comment.