Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
fix for failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
samelamin committed Nov 23, 2022
1 parent 1008f7e commit a7b88a2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/network/sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ prost-build = "0.11"
[dependencies]
array-bytes = "4.1"
async-trait = "0.1.58"
async-std = { version = "1.11.0", default-features = false }
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"] }
futures = "0.3.21"
libp2p = "0.49.0"
Expand Down
6 changes: 3 additions & 3 deletions client/network/sync/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -601,18 +601,18 @@ where
if let SyncMode::Warp = &self.mode {
if self.peers.len() >= MIN_PEERS_TO_START_WARP_SYNC && self.warp_sync.is_none()
{
async move {
match self.warp_sync_params.as_mut().unwrap() {
WarpSyncParams::WithProvider(warp_with_provider) => {
log::debug!(target: "sync", "Starting warp state sync.");
self.warp_sync = Some(WarpSync::new(self.client.clone(), warp_with_provider.clone()));
}
WarpSyncParams::WaitForTarget(header) => {
log::debug!(target: "sync", "Waiting for target block.");
self.warp_sync = Some(WarpSync::new_with_target_block(self.client.clone(), header.await.unwrap()));
async_std::task::block_on(async {
self.warp_sync = Some(WarpSync::new_with_target_block(self.client.clone(), header.await.unwrap()));
});
}
}
}.boxed();
}
}
Ok(req)
Expand Down

0 comments on commit a7b88a2

Please sign in to comment.