Fix panic when post-verifying Precommits in log

Notes an edge case which enables invalid commit production.
This commit is contained in:
Luke Parker
2023-08-31 01:02:55 -04:00
parent 1e79de87e8
commit 8dad62f300
2 changed files with 28 additions and 8 deletions

View File

@@ -57,6 +57,14 @@ impl<N: Network> RoundData<N> {
// Poll all set timeouts, returning the Step whose timeout has just expired
pub(crate) async fn timeout_future(&self) -> Step {
let now = Instant::now();
log::trace!(
target: "tendermint",
"getting timeout_future, from step {:?}, off timeouts: {:?}",
self.step,
self.timeouts.iter().map(|(k, v)| (k, v.duration_since(now))).collect::<HashMap<_, _>>()
);
let timeout_future = |step| {
let timeout = self.timeouts.get(&step).copied();
(async move {