Remove HostTrait altogether (#8681)
This commit is contained in:
committed by
Marek Kotewicz
parent
2060ea5de3
commit
3d76417353
@@ -21,7 +21,7 @@ use std::ops::Range;
|
||||
use std::time::Duration;
|
||||
use bytes::Bytes;
|
||||
use devp2p::NetworkService;
|
||||
use network::{NetworkProtocolHandler, NetworkContext, HostInfo, PeerId, ProtocolId,
|
||||
use network::{NetworkProtocolHandler, NetworkContext, PeerId, ProtocolId,
|
||||
NetworkConfiguration as BasicNetworkConfiguration, NonReservedPeerMode, Error, ErrorKind,
|
||||
ConnectionFilter};
|
||||
use ethereum_types::{H256, H512, U256};
|
||||
@@ -371,7 +371,7 @@ struct SyncProtocolHandler {
|
||||
}
|
||||
|
||||
impl NetworkProtocolHandler for SyncProtocolHandler {
|
||||
fn initialize(&self, io: &NetworkContext, _host_info: &HostInfo) {
|
||||
fn initialize(&self, io: &NetworkContext) {
|
||||
if io.subprotocol_name() != WARP_SYNC_PROTOCOL_ID {
|
||||
io.register_timer(0, Duration::from_secs(1)).expect("Error registering sync timer");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user