From 1d34a02384082ac793a2e18a7b50b7448378beb1 Mon Sep 17 00:00:00 2001 From: pmnoxx Date: Tue, 30 Nov 2021 09:39:38 -0800 Subject: [PATCH] re: Remove unused dependencies for `near-network` (#5508) Remove unused dependencies for `near-network`. --- Cargo.lock | 6 ------ chain/network/Cargo.toml | 16 +++++----------- chain/network/src/test_utils.rs | 2 +- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0d156865acb..557043bb667 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2865,20 +2865,14 @@ dependencies = [ "actix", "bencher", "borsh 0.9.1", - "byteorder", "bytes", "bytesize", "cached", - "chrono", "conqueue", "deepsize", "delay-detector", "futures", - "lazy_static", - "near-actix-test-utils", - "near-chain", "near-crypto", - "near-logger-utils", "near-metrics", "near-network-primitives", "near-performance-metrics", diff --git a/chain/network/Cargo.toml b/chain/network/Cargo.toml index 46a833c0fff..da103090437 100644 --- a/chain/network/Cargo.toml +++ b/chain/network/Cargo.toml @@ -7,27 +7,24 @@ edition = "2021" [dependencies] actix = "=0.11.0-beta.2" -borsh = { version = "0.9", features = ["rc"]} -byteorder = "1.2" +borsh = { version = "0.9", features = ["rc"] } bytes = "1" bytesize = "1.1" cached = "0.23" -chrono = { version = "0.4.4", features = ["serde"] } conqueue = "0.4.0" futures = "0.3" -lazy_static = "1.4" near-rust-allocator-proxy = "0.3.0" once_cell = "1.5.2" rand = "0.7" serde = { version = "1", features = ["derive", "rc", "alloc"], optional=true } strum = { version = "0.20", features = ["derive"] } -tokio = { version = "1.1", features = ["full"] } +tokio = { version = "1.1", features = ["net"] } tokio-stream = { version = "0.1.2", features = ["net"] } tokio-util = { version = "0.6", features = ["codec"] } tracing = "0.1.13" deepsize = { version = "0.2.0", optional = true } -delay-detector = { path = "../../tools/delay_detector", optional = true} +delay-detector = { path = "../../tools/delay_detector", optional = true } near-crypto = { path = "../../core/crypto" } near-metrics = { path = "../../core/metrics" } near-network-primitives = { path = "../network-primitives" } @@ -35,20 +32,17 @@ near-performance-metrics = { path = "../../utils/near-performance-metrics" } near-performance-metrics-macros = { path = "../../utils/near-performance-metrics-macros" } near-primitives = { path = "../../core/primitives" } near-rate-limiter = { path = "../../utils/near-rate-limiter" } -near-stable-hasher = { path = "../../utils/near-stable-hasher" } +near-stable-hasher = { path = "../../utils/near-stable-hasher", optional = true } near-store = { path = "../../core/store" } [dev-dependencies] bencher = "0.1.5" -near-actix-test-utils = { path = "../../test-utils/actix-test-utils" } -near-chain = { path = "../chain" } -near-logger-utils = {path = "../../test-utils/logger"} tempfile = "3" [features] delay_detector = ["delay-detector"] performance_stats = ["near-performance-metrics/performance_stats"] -protocol_feature_routing_exchange_algorithm = ["near-primitives/protocol_feature_routing_exchange_algorithm"] +protocol_feature_routing_exchange_algorithm = ["near-primitives/protocol_feature_routing_exchange_algorithm", "near-stable-hasher"] sandbox = ["near-network-primitives/sandbox"] test_features = ["near-network-primitives/test_features", "serde"] deepsize_feature = ["deepsize", "near-primitives/deepsize_feature", "near-crypto/deepsize_feature", "near-network-primitives/deepsize_feature"] diff --git a/chain/network/src/test_utils.rs b/chain/network/src/test_utils.rs index 8a88316fe40..2c320e7d2d7 100644 --- a/chain/network/src/test_utils.rs +++ b/chain/network/src/test_utils.rs @@ -76,7 +76,7 @@ pub fn wait_or_panic(max_wait_ms: u64) { /// /// # Example /// -/// ``` +/// ```rust,ignore /// use actix::{System, Actor}; /// use near_network::test_utils::WaitOrTimeoutActor; /// use std::time::{Instant, Duration};