@@ -4,7 +4,7 @@ use futures::future::BoxFuture;
44use futures:: prelude:: * ;
55use libp2p:: core:: connection:: ConnectionId ;
66use libp2p:: core:: upgrade:: { NegotiationError , ProtocolError } ;
7- use libp2p:: core:: { UpgradeError , UpgradeInfo , PeerId } ;
7+ use libp2p:: core:: { PeerId , UpgradeError , UpgradeInfo } ;
88use libp2p:: multiaddr:: { Multiaddr , Protocol as MProtocol } ;
99use libp2p:: swarm:: handler:: SubstreamProtocol ;
1010use libp2p:: swarm:: {
@@ -15,13 +15,12 @@ use libp2p::swarm::{NotifyHandler, PollParameters, SwarmBuilder, SwarmEvent};
1515use libp2p:: OutboundUpgrade ;
1616use lighthouse_network:: rpc:: methods:: RPCCodedResponse ;
1717use lighthouse_network:: rpc:: {
18- max_rpc_size, BaseOutboundCodec , Encoding , GoodbyeReason ,
19- HandlerErr , HandlerEvent , HandlerState ,
20- OutboundCodec , OutboundFramed , OutboundInfo , OutboundRequest , OutboundSubstreamState , Protocol ,
21- ProtocolId , RPCError , RPCMessage , RPCProtocol , RPCReceived , RPCSend ,
22- ReqId , SSZSnappyOutboundCodec , SubstreamId , Version ,
18+ max_rpc_size, BaseOutboundCodec , Encoding , GoodbyeReason , HandlerErr , HandlerEvent ,
19+ HandlerState , OutboundCodec , OutboundFramed , OutboundInfo , OutboundRequest ,
20+ OutboundSubstreamState , Protocol , ProtocolId , RPCError , RPCMessage , RPCProtocol , RPCReceived ,
21+ RPCSend , ReqId , SSZSnappyOutboundCodec , SubstreamId , Version ,
2322} ;
24- use lighthouse_network:: { error, Request , NetworkConfig } ;
23+ use lighthouse_network:: { error, NetworkConfig , Request } ;
2524use slog:: { crit, debug, o, trace} ;
2625use smallvec:: SmallVec ;
2726use std:: collections:: hash_map:: Entry ;
@@ -35,7 +34,7 @@ use tokio::time::Instant as TInstant;
3534use tokio_util:: { codec:: Framed , compat:: FuturesAsyncReadCompatExt , time:: DelayQueue } ;
3635use types:: { EthSpec , ForkContext } ;
3736
38- use lighthouse_network:: { build_transport, Context as ServiceContext , } ;
37+ use lighthouse_network:: { build_transport, Context as ServiceContext } ;
3938
4039/// The time (in seconds) before a substream that is awaiting a response from the user times out.
4140pub const RESPONSE_TIMEOUT : u64 = 10 ;
@@ -470,7 +469,7 @@ where
470469 match rpc_event {
471470 RPCSend :: Request ( id, req) => self . send_request ( id, req) ,
472471 RPCSend :: Shutdown ( id, reason) => self . shutdown ( Some ( ( id, reason) ) ) ,
473- _ => { } ,
472+ _ => { }
474473 }
475474 // In any case, we need the handler to process the event.
476475 if let Some ( waker) = & self . waker {
0 commit comments