mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +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
@@ -37,7 +37,7 @@ rpassword = "4.0.1"
|
||||
substrate-tracing = { package = "substrate-tracing", path = "../tracing" }
|
||||
|
||||
[dev-dependencies]
|
||||
tempdir = "0.3.7"
|
||||
tempfile = "3.1.0"
|
||||
|
||||
[features]
|
||||
wasmtime = [
|
||||
|
||||
@@ -969,7 +969,6 @@ fn kill_color(s: &str) -> String {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use tempdir::TempDir;
|
||||
use network::config::identity::ed25519;
|
||||
|
||||
#[test]
|
||||
@@ -1018,7 +1017,7 @@ mod tests {
|
||||
fn secret_file(net_config_dir: Option<String>) -> error::Result<()> {
|
||||
NodeKeyType::variants().into_iter().try_for_each(|t| {
|
||||
let node_key_type = NodeKeyType::from_str(t).unwrap();
|
||||
let tmp = TempDir::new("alice")?;
|
||||
let tmp = tempfile::Builder::new().prefix("alice").tempdir()?;
|
||||
let file = tmp.path().join(format!("{}_mysecret", t)).to_path_buf();
|
||||
let params = NodeKeyParams {
|
||||
node_key_type,
|
||||
|
||||
@@ -29,7 +29,7 @@ sp-blockchain = { path = "../../primitives/blockchain" }
|
||||
substrate-keyring = { path = "../../primitives/keyring" }
|
||||
test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" }
|
||||
env_logger = "0.7.0"
|
||||
quickcheck = "0.8"
|
||||
quickcheck = "0.9"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
||||
@@ -14,7 +14,7 @@ serializer = { package = "substrate-serializer", path = "../../primitives/serial
|
||||
runtime_version = { package = "sr-version", path = "../../primitives/sr-version" }
|
||||
panic-handler = { package = "substrate-panic-handler", path = "../../primitives/panic-handler" }
|
||||
wasmi = "0.6.2"
|
||||
parity-wasm = "0.40.3"
|
||||
parity-wasm = "0.41.0"
|
||||
lazy_static = "1.4.0"
|
||||
wasm-interface = { package = "substrate-wasm-interface", path = "../../primitives/wasm-interface" }
|
||||
runtime-interface = { package = "substrate-runtime-interface", path = "../../primitives/runtime-interface" }
|
||||
|
||||
@@ -8,11 +8,11 @@ edition = "2018"
|
||||
derive_more = "0.99.2"
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives/core" }
|
||||
app-crypto = { package = "substrate-application-crypto", path = "../../primitives/application-crypto" }
|
||||
hex = "0.3.2"
|
||||
hex = "0.4.0"
|
||||
rand = "0.7.2"
|
||||
serde_json = "1.0.41"
|
||||
subtle = "2.1.1"
|
||||
parking_lot = "0.9.0"
|
||||
|
||||
[dev-dependencies]
|
||||
tempdir = "0.3.7"
|
||||
tempfile = "3.1.0"
|
||||
|
||||
@@ -317,12 +317,12 @@ impl BareCryptoStore for Store {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use tempdir::TempDir;
|
||||
use tempfile::TempDir;
|
||||
use primitives::{testing::{SR25519}, crypto::{Ss58Codec}};
|
||||
|
||||
#[test]
|
||||
fn basic_store() {
|
||||
let temp_dir = TempDir::new("keystore").unwrap();
|
||||
let temp_dir = TempDir::new().unwrap();
|
||||
let store = Store::open(temp_dir.path(), None).unwrap();
|
||||
|
||||
assert!(store.read().public_keys::<ed25519::AppPublic>().unwrap().is_empty());
|
||||
@@ -337,7 +337,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_insert_ephemeral_from_seed() {
|
||||
let temp_dir = TempDir::new("keystore").unwrap();
|
||||
let temp_dir = TempDir::new().unwrap();
|
||||
let store = Store::open(temp_dir.path(), None).unwrap();
|
||||
|
||||
let pair: ed25519::AppPair = store
|
||||
@@ -358,7 +358,7 @@ mod tests {
|
||||
#[test]
|
||||
fn password_being_used() {
|
||||
let password = String::from("password");
|
||||
let temp_dir = TempDir::new("keystore").unwrap();
|
||||
let temp_dir = TempDir::new().unwrap();
|
||||
let store = Store::open(temp_dir.path(), Some(password.clone().into())).unwrap();
|
||||
|
||||
let pair: ed25519::AppPair = store.write().generate().unwrap();
|
||||
@@ -380,7 +380,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn public_keys_are_returned() {
|
||||
let temp_dir = TempDir::new("keystore").unwrap();
|
||||
let temp_dir = TempDir::new().unwrap();
|
||||
let store = Store::open(temp_dir.path(), None).unwrap();
|
||||
|
||||
let mut public_keys = Vec::new();
|
||||
@@ -403,7 +403,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn store_unknown_and_extract_it() {
|
||||
let temp_dir = TempDir::new("keystore").unwrap();
|
||||
let temp_dir = TempDir::new().unwrap();
|
||||
let store = Store::open(temp_dir.path(), None).unwrap();
|
||||
|
||||
let secret_uri = "//Alice";
|
||||
|
||||
@@ -57,7 +57,7 @@ quickcheck = "0.9.0"
|
||||
rand = "0.7.2"
|
||||
test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" }
|
||||
test_runtime = { package = "substrate-test-runtime", path = "../../test/utils/runtime" }
|
||||
tempdir = "0.3.7"
|
||||
tempfile = "3.1.0"
|
||||
tokio = "0.1.22"
|
||||
|
||||
[features]
|
||||
|
||||
@@ -502,7 +502,11 @@ where
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use tempdir::TempDir;
|
||||
use tempfile::TempDir;
|
||||
|
||||
fn tempdir_with_prefix(prefix: &str) -> TempDir {
|
||||
tempfile::Builder::new().prefix(prefix).tempdir().unwrap()
|
||||
}
|
||||
|
||||
fn secret_bytes(kp: &Keypair) -> Vec<u8> {
|
||||
match kp {
|
||||
@@ -514,7 +518,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_secret_file() {
|
||||
let tmp = TempDir::new("x").unwrap();
|
||||
let tmp = tempdir_with_prefix("x");
|
||||
std::fs::remove_dir(tmp.path()).unwrap(); // should be recreated
|
||||
let file = tmp.path().join("x").to_path_buf();
|
||||
let kp1 = NodeKeyConfig::Ed25519(Secret::File(file.clone())).into_keypair().unwrap();
|
||||
|
||||
@@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
tempdir = "0.3.7"
|
||||
tempfile = "3.1.0"
|
||||
tokio = "0.1.22"
|
||||
futures = "0.1.29"
|
||||
log = "0.4.8"
|
||||
|
||||
@@ -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