Remove deadlock in cosign_evaluator

This commit is contained in:
Luke Parker 2023-11-16 13:32:15 -05:00
parent 30a77d863f
commit 14f3f330db
No known key found for this signature in database

View file

@ -256,8 +256,10 @@ impl<D: Db> CosignEvaluator<D> {
panic!("17% of validator sets (by stake) have co-signed a distinct chain");
}
} else {
let mut latest_cosigns = self.latest_cosigns.write().await;
latest_cosigns.insert(cosign.network, (block.number(), cosign));
{
let mut latest_cosigns = self.latest_cosigns.write().await;
latest_cosigns.insert(cosign.network, (block.number(), cosign));
}
self.update_latest_cosign().await;
}