Cherry pick fix for freeze (#4459)

* check freeze before updating slot_hashes (#4448)

* check freeze before updating slot_hashes

* fixup

* add more information to dropped vote warning (#4449)

* add more information to dropped vote warning

* fixup
This commit is contained in:
Rob Walker
2019-05-28 19:35:54 -07:00
committed by Dan Albert
parent b9b541441b
commit b4adb1c266
2 changed files with 23 additions and 7 deletions

View File

@@ -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;
}