mirror of
https://github.com/serai-dex/serai.git
synced 2025-03-12 09:26:51 +00:00
Clean up lock acquisition
This commit is contained in:
parent
9b8f2f4487
commit
5839f44290
1 changed files with 5 additions and 2 deletions
|
@ -351,8 +351,11 @@ where
|
|||
let (header, body) = block.clone().deconstruct();
|
||||
let parent = *header.parent_hash();
|
||||
let number = *header.number();
|
||||
|
||||
let mut queue_write = self.queue.write().await;
|
||||
*self.importing_block.write().unwrap() = Some(hash);
|
||||
self.queue.write().await.as_mut().unwrap().import_blocks(
|
||||
|
||||
queue_write.as_mut().unwrap().import_blocks(
|
||||
// We do not want this block, which hasn't been confirmed, to be broadcast over the net
|
||||
// Substrate will generate notifications unless it's Genesis, which this isn't, InitialSync,
|
||||
// which changes telemtry behavior, or File, which is... close enough
|
||||
|
@ -372,7 +375,7 @@ where
|
|||
}],
|
||||
);
|
||||
|
||||
if !ImportFuture::new(hash, self.queue.write().await.as_mut().unwrap()).await {
|
||||
if !ImportFuture::new(hash, queue_write.as_mut().unwrap()).await {
|
||||
todo!()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue