49
49
//! Peers who send information which was not allowed under a recent neighbor packet
50
50
//! will be noted as non-beneficial to Substrate's peer-set management utility.
51
51
52
- use sr_primitives :: { generic:: BlockId , traits:: ProvideRuntimeApi } ;
52
+ use sp_runtime :: { generic:: BlockId , traits:: ProvideRuntimeApi } ;
53
53
use sp_blockchain:: Error as ClientError ;
54
- use substrate_network :: { config:: Roles , PeerId } ;
55
- use substrate_network :: consensus_gossip:: {
54
+ use sc_network :: { config:: Roles , PeerId } ;
55
+ use sc_network :: consensus_gossip:: {
56
56
self as network_gossip, ValidationResult as GossipValidationResult ,
57
57
ValidatorContext , MessageIntent , ConsensusMessage ,
58
58
} ;
@@ -78,7 +78,7 @@ mod attestation;
78
78
mod message_routing;
79
79
80
80
/// The engine ID of the polkadot attestation system.
81
- pub const POLKADOT_ENGINE_ID : sr_primitives :: ConsensusEngineId = * b"dot1" ;
81
+ pub const POLKADOT_ENGINE_ID : sp_runtime :: ConsensusEngineId = * b"dot1" ;
82
82
83
83
// arbitrary; in practice this should not be more than 2.
84
84
pub ( crate ) const MAX_CHAIN_HEADS : usize = 5 ;
@@ -330,7 +330,7 @@ impl NewLeafActions {
330
330
pub fn perform (
331
331
self ,
332
332
gossip : & mut dyn crate :: GossipService ,
333
- ctx : & mut dyn substrate_network :: Context < Block > ,
333
+ ctx : & mut dyn sc_network :: Context < Block > ,
334
334
) {
335
335
for action in self . actions {
336
336
match action {
@@ -655,12 +655,12 @@ impl<C: ChainContext + ?Sized> network_gossip::Validator<Block> for MessageValid
655
655
#[ cfg( test) ]
656
656
mod tests {
657
657
use super :: * ;
658
- use substrate_network :: consensus_gossip:: Validator as ValidatorT ;
658
+ use sc_network :: consensus_gossip:: Validator as ValidatorT ;
659
659
use std:: sync:: mpsc;
660
660
use parking_lot:: Mutex ;
661
661
use polkadot_primitives:: parachain:: { CandidateReceipt , HeadData } ;
662
- use substrate_primitives :: crypto:: UncheckedInto ;
663
- use substrate_primitives :: sr25519:: { Public as Sr25519Public , Signature as Sr25519Signature } ;
662
+ use sp_core :: crypto:: UncheckedInto ;
663
+ use sp_core :: sr25519:: { Public as Sr25519Public , Signature as Sr25519Signature } ;
664
664
use polkadot_validation:: GenericStatement ;
665
665
use super :: message_routing:: queue_topic;
666
666
0 commit comments