mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 06:31:03 +00:00
Some tweaks in the network crate (#1108)
* Move Roles to network::config * Make network::config public * Move NetworkConfig and NonReservedMode to config * Move Params to config * Move node_id() to NetworkManager and fix tests * Rename Specialization to NetworkSpecialization
This commit is contained in:
@@ -35,7 +35,7 @@ use keyring::Keyring;
|
||||
use codec::Encode;
|
||||
use import_queue::{SyncImportQueue, PassThroughVerifier, Verifier};
|
||||
use consensus::BlockOrigin;
|
||||
use specialization::Specialization;
|
||||
use specialization::NetworkSpecialization;
|
||||
use consensus_gossip::ConsensusGossip;
|
||||
use import_queue::ImportQueue;
|
||||
use service::ExecuteInContext;
|
||||
@@ -62,7 +62,7 @@ pub struct DummySpecialization {
|
||||
pub gossip: ConsensusGossip<Block>,
|
||||
}
|
||||
|
||||
impl Specialization<Block> for DummySpecialization {
|
||||
impl NetworkSpecialization<Block> for DummySpecialization {
|
||||
fn status(&self) -> Vec<u8> { vec![] }
|
||||
|
||||
fn on_connect(&mut self, ctx: &mut Context<Block>, peer_id: NodeIndex, status: ::message::Status<Block>) {
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
use client::backend::Backend;
|
||||
use client::blockchain::HeaderBackend as BlockchainHeaderBackend;
|
||||
use config::Roles;
|
||||
use consensus::BlockOrigin;
|
||||
use sync::SyncState;
|
||||
use Roles;
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user