mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 22:01:04 +00:00
Network sync refactoring (part 7) (#12006)
* Move `MultiaddrWithPeerId` and related parsing functions into `sc-network-common`, remove dependency on `sc-network` from `sc-chain-spec` * Remove dependency on `sc-network` from `sc-offchain` * Remove dependency on `sc-network` from `sc-network-gossip`
This commit is contained in:
@@ -21,6 +21,7 @@ futures-timer = "3.0.2"
|
||||
hex = "0.4"
|
||||
hyper = { version = "0.14.16", features = ["stream", "http2"] }
|
||||
hyper-rustls = { version = "0.23.0", features = ["http2"] }
|
||||
libp2p = { version = "0.46.1", default-features = false }
|
||||
num_cpus = "1.13"
|
||||
once_cell = "1.8"
|
||||
parking_lot = "0.12.0"
|
||||
@@ -28,8 +29,8 @@ rand = "0.7.2"
|
||||
threadpool = "1.7"
|
||||
tracing = "0.1.29"
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../api" }
|
||||
sc-network = { version = "0.10.0-dev", path = "../network" }
|
||||
sc-network-common = { version = "0.10.0-dev", path = "../network/common" }
|
||||
sc-peerset = { version = "4.0.0-dev", path = "../peerset" }
|
||||
sc-utils = { version = "4.0.0-dev", path = "../utils" }
|
||||
sp-api = { version = "4.0.0-dev", path = "../../primitives/api" }
|
||||
sp-core = { version = "6.0.0", path = "../../primitives/core" }
|
||||
|
||||
@@ -22,7 +22,7 @@ use crate::NetworkProvider;
|
||||
use codec::{Decode, Encode};
|
||||
use futures::Future;
|
||||
pub use http::SharedClient;
|
||||
use sc_network::{Multiaddr, PeerId};
|
||||
use libp2p::{Multiaddr, PeerId};
|
||||
use sp_core::{
|
||||
offchain::{
|
||||
self, HttpError, HttpRequestId, HttpRequestStatus, OffchainStorage, OpaqueMultiaddr,
|
||||
@@ -324,9 +324,10 @@ impl AsyncApi {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use libp2p::PeerId;
|
||||
use sc_client_db::offchain::LocalStorage;
|
||||
use sc_network::{PeerId, ReputationChange};
|
||||
use sc_network_common::service::{NetworkPeers, NetworkStateInfo};
|
||||
use sc_peerset::ReputationChange;
|
||||
use sp_core::offchain::{DbExternalities, Externalities};
|
||||
use std::{borrow::Cow, time::SystemTime};
|
||||
|
||||
|
||||
@@ -246,9 +246,10 @@ pub async fn notification_future<Client, Block, Spawner>(
|
||||
mod tests {
|
||||
use super::*;
|
||||
use futures::executor::block_on;
|
||||
use libp2p::{Multiaddr, PeerId};
|
||||
use sc_block_builder::BlockBuilderProvider as _;
|
||||
use sc_client_api::Backend as _;
|
||||
use sc_network::{Multiaddr, PeerId, ReputationChange};
|
||||
use sc_peerset::ReputationChange;
|
||||
use sc_transaction_pool::{BasicPool, FullChainApi};
|
||||
use sc_transaction_pool_api::{InPoolTransaction, TransactionPool};
|
||||
use sp_consensus::BlockOrigin;
|
||||
|
||||
Reference in New Issue
Block a user