We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b767340 commit 9bcb739Copy full SHA for 9bcb739
1 file changed
fendermint/app/src/app.rs
@@ -421,8 +421,13 @@ where
421
// because it hasn't been committed to state store yet.
422
let mut cache = self.validators_cache.lock().await;
423
self.modify_exec_state(|s| {
424
+ // we need to leave this outside the closure
425
+ // otherwise `s`' lifetime would be captured by the
426
+ // closure causing unresolvable liftetime conflicts
427
+ // this is fine since we execute the future directly
428
+ // after calling the generator closure.
429
let x = ValidatorCache::new_from_state(s);
- async move {
430
+ async {
431
*cache = Some(x?);
432
Ok(())
433
}
0 commit comments