mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 21:01:05 +00:00
Upgrade tokio to 1.22.0 and replace async-std with tokio (#12646)
* Replace deprecated libp2p feature specs with correct ones * Bump tokio to 1.21.2 * Replace async-std libp2p primitives with tokio ones * minor: rustfmt * Fix TestNet to run initialization in the tokio context * Convert telemetry test from async-std to tokio * Convert notifications tests from async-std to tokio * Convert chain sync tests from async-std to tokio * Ditch async-std completely * Make executor mandatory * Bump tokio to 1.22.0 * minor: rustfmt * Explicitly use tokio runtime in tests * Move more tests to explicit tokio runtime * Explicitly set multithreaded runtime in tokio test * minor: rustfmt * minor: fix comment * Replace async-std with tokio in MMR tests
This commit is contained in:
@@ -77,6 +77,7 @@ pub(crate) mod tests {
|
||||
use super::*;
|
||||
use crate::tests::BeefyTestNet;
|
||||
use sc_network_test::TestNetFactory;
|
||||
use tokio::runtime::Runtime;
|
||||
|
||||
// also used in tests.rs
|
||||
pub fn verify_persisted_version<B: BlockT, BE: Backend<B>>(backend: &BE) -> bool {
|
||||
@@ -86,7 +87,8 @@ pub(crate) mod tests {
|
||||
|
||||
#[test]
|
||||
fn should_load_persistent_sanity_checks() {
|
||||
let mut net = BeefyTestNet::new(1);
|
||||
let runtime = Runtime::new().unwrap();
|
||||
let mut net = BeefyTestNet::new(runtime.handle().clone(), 1);
|
||||
let backend = net.peer(0).client().as_backend();
|
||||
|
||||
// version not available in db -> None
|
||||
|
||||
Reference in New Issue
Block a user