Make BlockManagerLocked fully private again

This commit is contained in:
Alex Auvolat
2022-09-02 16:52:22 +02:00
parent 47be652a1f
commit 5e8baa433d
2 changed files with 24 additions and 25 deletions
+2 -12
View File
@@ -282,12 +282,7 @@ impl BlockResyncManager {
}
async fn resync_block(&self, manager: &BlockManager, hash: &Hash) -> Result<(), Error> {
let BlockStatus { exists, needed } = manager
.mutation_lock
.lock()
.await
.check_block_status(hash, manager)
.await?;
let BlockStatus { exists, needed } = manager.check_block_status(hash).await?;
if exists != needed.is_needed() || exists != needed.is_nonzero() {
debug!(
@@ -370,12 +365,7 @@ impl BlockResyncManager {
who.len()
);
manager
.mutation_lock
.lock()
.await
.delete_if_unneeded(hash, manager)
.await?;
manager.delete_if_unneeded(hash).await?;
manager.rc.clear_deleted_block_rc(hash)?;
}