@@ -211,12 +211,12 @@ pub enum GossipSync<
211211}
212212
213213impl <
214- P : Deref < Target = P2PGossipSync < G , U , L > > ,
215- R : Deref < Target = RapidGossipSync < G , L > > ,
216- G : Deref < Target = NetworkGraph < L > > ,
217- U : UtxoLookup ,
218- L : Logger ,
219- > GossipSync < P , R , G , U , L >
214+ P : Deref < Target = P2PGossipSync < G , U , L > > ,
215+ R : Deref < Target = RapidGossipSync < G , L > > ,
216+ G : Deref < Target = NetworkGraph < L > > ,
217+ U : UtxoLookup ,
218+ L : Logger ,
219+ > GossipSync < P , R , G , U , L >
220220{
221221 fn network_graph ( & self ) -> Option < & G > {
222222 match self {
@@ -251,11 +251,11 @@ impl<
251251
252252/// This is not exported to bindings users as the bindings concretize everything and have constructors for us
253253impl <
254- P : Deref < Target = P2PGossipSync < G , U , L > > ,
255- G : Deref < Target = NetworkGraph < L > > ,
256- U : UtxoLookup ,
257- L : Logger ,
258- > GossipSync < P , & RapidGossipSync < G , L > , G , U , L >
254+ P : Deref < Target = P2PGossipSync < G , U , L > > ,
255+ G : Deref < Target = NetworkGraph < L > > ,
256+ U : UtxoLookup ,
257+ L : Logger ,
258+ > GossipSync < P , & RapidGossipSync < G , L > , G , U , L >
259259{
260260 /// Initializes a new [`GossipSync::P2P`] variant.
261261 pub fn p2p ( gossip_sync : P ) -> Self {
@@ -512,13 +512,13 @@ pub(crate) mod futures_util {
512512 }
513513
514514 impl <
515- A : Future < Output = bool > + Unpin ,
516- B : Future < Output = ( ) > + Unpin ,
517- C : Future < Output = ( ) > + Unpin ,
518- D : Future < Output = ( ) > + Unpin ,
519- E : Future < Output = ( ) > + Unpin ,
520- F : Future < Output = ( ) > + Unpin ,
521- > Future for Selector < A , B , C , D , E , F >
515+ A : Future < Output = bool > + Unpin ,
516+ B : Future < Output = ( ) > + Unpin ,
517+ C : Future < Output = ( ) > + Unpin ,
518+ D : Future < Output = ( ) > + Unpin ,
519+ E : Future < Output = ( ) > + Unpin ,
520+ F : Future < Output = ( ) > + Unpin ,
521+ > Future for Selector < A , B , C , D , E , F >
522522 {
523523 type Output = SelectorOutput ;
524524 fn poll (
@@ -615,13 +615,13 @@ pub(crate) mod futures_util {
615615 }
616616
617617 impl <
618- ERR ,
619- A : Future < Output = Result < ( ) , ERR > > + Unpin ,
620- B : Future < Output = Result < ( ) , ERR > > + Unpin ,
621- C : Future < Output = Result < ( ) , ERR > > + Unpin ,
622- D : Future < Output = Result < ( ) , ERR > > + Unpin ,
623- E : Future < Output = Result < ( ) , ERR > > + Unpin ,
624- > Joiner < ERR , A , B , C , D , E >
618+ ERR ,
619+ A : Future < Output = Result < ( ) , ERR > > + Unpin ,
620+ B : Future < Output = Result < ( ) , ERR > > + Unpin ,
621+ C : Future < Output = Result < ( ) , ERR > > + Unpin ,
622+ D : Future < Output = Result < ( ) , ERR > > + Unpin ,
623+ E : Future < Output = Result < ( ) , ERR > > + Unpin ,
624+ > Joiner < ERR , A , B , C , D , E >
625625 {
626626 pub ( crate ) fn new ( ) -> Self {
627627 Self {
@@ -654,13 +654,13 @@ pub(crate) mod futures_util {
654654 }
655655
656656 impl <
657- ERR ,
658- A : Future < Output = Result < ( ) , ERR > > + Unpin ,
659- B : Future < Output = Result < ( ) , ERR > > + Unpin ,
660- C : Future < Output = Result < ( ) , ERR > > + Unpin ,
661- D : Future < Output = Result < ( ) , ERR > > + Unpin ,
662- E : Future < Output = Result < ( ) , ERR > > + Unpin ,
663- > Future for Joiner < ERR , A , B , C , D , E >
657+ ERR ,
658+ A : Future < Output = Result < ( ) , ERR > > + Unpin ,
659+ B : Future < Output = Result < ( ) , ERR > > + Unpin ,
660+ C : Future < Output = Result < ( ) , ERR > > + Unpin ,
661+ D : Future < Output = Result < ( ) , ERR > > + Unpin ,
662+ E : Future < Output = Result < ( ) , ERR > > + Unpin ,
663+ > Future for Joiner < ERR , A , B , C , D , E >
664664 where
665665 Joiner < ERR , A , B , C , D , E > : Unpin ,
666666 {
@@ -946,43 +946,43 @@ where
946946 D :: Target : ChangeDestinationSource ,
947947{
948948 let async_event_handler = async |event| {
949- let network_graph = gossip_sync. network_graph ( ) ;
950- let event_handler = & event_handler;
951- let scorer = & scorer;
952- let logger = & logger;
953- let kv_store = & kv_store;
954- let fetch_time = & fetch_time;
955- if let Some ( network_graph) = network_graph {
956- handle_network_graph_update ( network_graph, & event)
957- }
949+ let network_graph = gossip_sync. network_graph ( ) ;
950+ let event_handler = & event_handler;
951+ let scorer = & scorer;
952+ let logger = & logger;
953+ let kv_store = & kv_store;
954+ let fetch_time = & fetch_time;
955+ if let Some ( network_graph) = network_graph {
956+ handle_network_graph_update ( network_graph, & event)
957+ }
958958 if let Some ( scorer) = scorer {
959- if let Some ( duration_since_epoch) = fetch_time ( ) {
960- if update_scorer ( scorer, & event, duration_since_epoch) {
961- log_trace ! ( logger, "Persisting scorer after update" ) ;
962- if let Err ( e) = kv_store
963- . write (
964- SCORER_PERSISTENCE_PRIMARY_NAMESPACE ,
965- SCORER_PERSISTENCE_SECONDARY_NAMESPACE ,
966- SCORER_PERSISTENCE_KEY ,
967- scorer. encode ( ) ,
968- )
969- . await
970- {
959+ if let Some ( duration_since_epoch) = fetch_time ( ) {
960+ if update_scorer ( scorer, & event, duration_since_epoch) {
961+ log_trace ! ( logger, "Persisting scorer after update" ) ;
962+ if let Err ( e) = kv_store
963+ . write (
964+ SCORER_PERSISTENCE_PRIMARY_NAMESPACE ,
965+ SCORER_PERSISTENCE_SECONDARY_NAMESPACE ,
966+ SCORER_PERSISTENCE_KEY ,
967+ scorer. encode ( ) ,
968+ )
969+ . await
970+ {
971971 log_error ! (
972972 logger,
973973 "Error: Failed to persist scorer, check your disk and permissions {}" ,
974974 e
975975 ) ;
976- // We opt not to abort early on persistence failure here as persisting
977- // the scorer is non-critical and we still hope that it will have
978- // resolved itself when it is potentially critical in event handling
979- // below.
980- }
976+ // We opt not to abort early on persistence failure here as persisting
977+ // the scorer is non-critical and we still hope that it will have
978+ // resolved itself when it is potentially critical in event handling
979+ // below.
981980 }
982981 }
983982 }
984- event_handler ( event) . await
985- } ;
983+ }
984+ event_handler ( event) . await
985+ } ;
986986 let mut batch_delay = BatchDelay :: new ( ) ;
987987
988988 log_trace ! ( logger, "Calling ChannelManager's timer_tick_occurred on startup" ) ;
@@ -1259,10 +1259,10 @@ where
12591259 . await
12601260 {
12611261 log_error ! (
1262- logger,
1263- "Error: Failed to persist scorer, check your disk and permissions {}" ,
1264- e
1265- ) ;
1262+ logger,
1263+ "Error: Failed to persist scorer, check your disk and permissions {}" ,
1264+ e
1265+ ) ;
12661266 }
12671267
12681268 Ok ( ( ) )
0 commit comments