mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Incorporate sc-peerset into sc-network (#14236)
This commit is contained in:
@@ -40,7 +40,7 @@ use sc_network::{
|
||||
FullNetworkConfiguration, NonDefaultSetConfig, ProtocolId, SyncMode as SyncOperationMode,
|
||||
},
|
||||
utils::LruHashSet,
|
||||
NotificationsSink, ProtocolName,
|
||||
NotificationsSink, ProtocolName, ReputationChange,
|
||||
};
|
||||
use sc_network_common::{
|
||||
role::Roles,
|
||||
@@ -94,7 +94,7 @@ const INACTIVITY_EVICT_THRESHOLD: Duration = Duration::from_secs(30);
|
||||
const INITIAL_EVICTION_WAIT_PERIOD: Duration = Duration::from_secs(2 * 60);
|
||||
|
||||
mod rep {
|
||||
use sc_peerset::ReputationChange as Rep;
|
||||
use sc_network::ReputationChange as Rep;
|
||||
/// Peer has different genesis.
|
||||
pub const GENESIS_MISMATCH: Rep = Rep::new_fatal("Genesis mismatch");
|
||||
/// Peer send us a block announcement that failed at validation.
|
||||
@@ -719,7 +719,7 @@ where
|
||||
.disconnect_peer(peer, self.block_announce_protocol_name.clone());
|
||||
self.network_service.report_peer(
|
||||
peer,
|
||||
sc_peerset::ReputationChange::new_fatal("Invalid justification"),
|
||||
ReputationChange::new_fatal("Invalid justification"),
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user