mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Remove reliance on a blockchain read lock from block/commit
This commit is contained in:
@@ -124,14 +124,14 @@ pub async fn wait_for_tx_inclusion(
|
||||
continue;
|
||||
}
|
||||
|
||||
let mut queue = vec![tributary.block(&tip).await.unwrap()];
|
||||
let mut queue = vec![tributary.block(&tip).unwrap()];
|
||||
let mut block = None;
|
||||
while {
|
||||
let parent = queue.last().unwrap().parent();
|
||||
if parent == tributary.genesis() {
|
||||
false
|
||||
} else {
|
||||
block = Some(tributary.block(&parent).await.unwrap());
|
||||
block = Some(tributary.block(&parent).unwrap());
|
||||
block.as_ref().unwrap().hash() != last_checked
|
||||
}
|
||||
} {
|
||||
|
||||
@@ -46,7 +46,7 @@ async fn tx_test() {
|
||||
|
||||
// All tributaries should have acknowledged this transaction in a block
|
||||
for (_, tributary) in tributaries {
|
||||
let block = tributary.block(&included_in).await.unwrap();
|
||||
let block = tributary.block(&included_in).unwrap();
|
||||
assert_eq!(block.transactions, vec![tx.clone()]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user