mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 19:47:59 +00:00
Prune some duplicate dependencies (#4219)
* Prune some duplicate dependencies * Remove ed25519-dalek 0.9.1 * Remove hex 0.3.2 * Remove parity-wasm 0.40.3 * Remove pwasm-utils 0.11.0 * Remove wasmi-validation 0.2.0 * Remove quickcheck 0.8.5 * Remove tempdir (Replace tempdir with tempfile) Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Remove useless tempdir_with_prefix Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Remove derive_more 0.15 Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
committed by
Bastian Köcher
parent
a782021ee8
commit
4a21f9bbfd
@@ -22,7 +22,7 @@ use std::net::Ipv4Addr;
|
||||
use std::time::Duration;
|
||||
use log::info;
|
||||
use futures::{Future, Stream, Poll};
|
||||
use tempdir::TempDir;
|
||||
use tempfile::TempDir;
|
||||
use tokio::{runtime::Runtime, prelude::FutureExt};
|
||||
use tokio::timer::Interval;
|
||||
use service::{
|
||||
@@ -290,6 +290,10 @@ impl<G, E, F, L, U> TestNet<G, E, F, L, U> where
|
||||
}
|
||||
}
|
||||
|
||||
fn tempdir_with_prefix(prefix: &str) -> TempDir {
|
||||
tempfile::Builder::new().prefix(prefix).tempdir().expect("Error creating test dir")
|
||||
}
|
||||
|
||||
pub fn connectivity<G, E, Fb, F, Lb, L>(
|
||||
spec: ChainSpec<G, E>,
|
||||
full_builder: Fb,
|
||||
@@ -314,7 +318,7 @@ pub fn connectivity<G, E, Fb, F, Lb, L>(
|
||||
};
|
||||
|
||||
{
|
||||
let temp = TempDir::new("substrate-connectivity-test").expect("Error creating test dir");
|
||||
let temp = tempdir_with_prefix("substrate-connectivity-test");
|
||||
let runtime = {
|
||||
let mut network = TestNet::new(
|
||||
&temp,
|
||||
@@ -352,7 +356,7 @@ pub fn connectivity<G, E, Fb, F, Lb, L>(
|
||||
temp.close().expect("Error removing temp dir");
|
||||
}
|
||||
{
|
||||
let temp = TempDir::new("substrate-connectivity-test").expect("Error creating test dir");
|
||||
let temp = tempdir_with_prefix("substrate-connectivity-test");
|
||||
{
|
||||
let mut network = TestNet::new(
|
||||
&temp,
|
||||
@@ -414,7 +418,7 @@ pub fn sync<G, E, Fb, F, Lb, L, B, ExF, U>(
|
||||
// FIXME: BABE light client support is currently not working.
|
||||
const NUM_LIGHT_NODES: usize = 10;
|
||||
const NUM_BLOCKS: usize = 512;
|
||||
let temp = TempDir::new("substrate-sync-test").expect("Error creating test dir");
|
||||
let temp = tempdir_with_prefix("substrate-sync-test");
|
||||
let mut network = TestNet::new(
|
||||
&temp,
|
||||
spec.clone(),
|
||||
@@ -479,7 +483,7 @@ pub fn consensus<G, E, Fb, F, Lb, L>(
|
||||
const NUM_FULL_NODES: usize = 10;
|
||||
const NUM_LIGHT_NODES: usize = 10;
|
||||
const NUM_BLOCKS: usize = 10; // 10 * 2 sec block production time = ~20 seconds
|
||||
let temp = TempDir::new("substrate-conensus-test").expect("Error creating test dir");
|
||||
let temp = tempdir_with_prefix("substrate-conensus-test");
|
||||
let mut network = TestNet::new(
|
||||
&temp,
|
||||
spec.clone(),
|
||||
|
||||
Reference in New Issue
Block a user