diff --git a/crates/amaru/src/consensus/mod.rs b/crates/amaru/src/consensus/mod.rs index 3201c02..2e9b100 100644 --- a/crates/amaru/src/consensus/mod.rs +++ b/crates/amaru/src/consensus/mod.rs @@ -94,6 +94,9 @@ impl gasket::framework::Worker for Worker { let ledger = stage.ledger.lock().await; assert_header(&header, &stage.epoch_to_nonce, &*ledger)?; + // Make sure the Mutex is released as soon as possible + drop(ledger); + let block = { let mut peer_session = stage.peer_session.lock().await; let client = (*peer_session).blockfetch();