Use sc_network::NetworkStateInfo instead of implementing redundant traits (#4436)

* Implement local_peer_id for gossip

* refactor local_peer_id

* fix

* reset gossip

* Update tests.rs

* fix ci

* fix review

* fix Cargo.lock

* fix Cargo.lock
This commit is contained in:
Weiliang Li
2019-12-25 00:17:19 +09:00
committed by Gavin Wood
parent 901dff5d14
commit fe587c72ec
8 changed files with 397 additions and 381 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ use sp_consensus::Error as ConsensusError;
use sp_consensus::{BlockOrigin, ForkChoiceStrategy, BlockImportParams, BlockCheckParams, JustificationImport};
use futures::prelude::*;
use futures03::{StreamExt as _, TryStreamExt as _};
use sc_network::{NetworkWorker, NetworkService, ReportHandle, config::ProtocolId};
use sc_network::{NetworkWorker, NetworkStateInfo, NetworkService, ReportHandle, config::ProtocolId};
use sc_network::config::{NetworkConfiguration, TransportConfig, BoxFinalityProofRequestBuilder};
use libp2p::PeerId;
use parking_lot::Mutex;