@@ -46,7 +46,9 @@ use crate::ln::channel::{Channel, ChannelError, ChannelUpdateStatus, UpdateFulfi
46
46
use crate :: ln:: features:: { ChannelFeatures , ChannelTypeFeatures , InitFeatures , NodeFeatures } ;
47
47
#[ cfg( any( feature = "_test_utils" , test) ) ]
48
48
use crate :: ln:: features:: InvoiceFeatures ;
49
- use crate :: routing:: router:: { InFlightHtlcs , PaymentParameters , Route , RouteHop , RoutePath , Router } ;
49
+ use crate :: routing:: gossip:: NetworkGraph ;
50
+ use crate :: routing:: router:: { DefaultRouter , InFlightHtlcs , PaymentParameters , Route , RouteHop , RoutePath , Router } ;
51
+ use crate :: routing:: scoring:: ProbabilisticScorer ;
50
52
use crate :: ln:: msgs;
51
53
use crate :: ln:: onion_utils;
52
54
use crate :: ln:: onion_utils:: HTLCFailReason ;
@@ -490,24 +492,35 @@ struct PendingInboundPayment {
490
492
/// when you're using lightning-net-tokio (since tokio::spawn requires parameters with static
491
493
/// lifetimes). Other times you can afford a reference, which is more efficient, in which case
492
494
/// SimpleRefChannelManager is the more appropriate type. Defining these type aliases prevents
493
- /// issues such as overly long function definitions. Note that the ChannelManager can take any
494
- /// type that implements KeysInterface for its keys manager, but this type alias chooses the
495
- /// concrete type of the KeysManager.
495
+ /// issues such as overly long function definitions. Note that the ChannelManager can take any type
496
+ /// that implements KeysInterface or Router for its keys manager and router, respectively, but this
497
+ /// type alias chooses the concrete types of KeysManager and DefaultRouter .
496
498
///
497
499
/// (C-not exported) as Arcs don't make sense in bindings
498
- pub type SimpleArcChannelManager < M , T , F , R , L > = ChannelManager < Arc < M > , Arc < T > , Arc < KeysManager > , Arc < F > , Arc < R > , Arc < L > > ;
500
+ pub type SimpleArcChannelManager < M , T , F , L > = ChannelManager <
501
+ Arc < M > ,
502
+ Arc < T > ,
503
+ Arc < KeysManager > ,
504
+ Arc < F > ,
505
+ Arc < DefaultRouter <
506
+ Arc < NetworkGraph < Arc < L > > > ,
507
+ Arc < L > ,
508
+ Arc < Mutex < ProbabilisticScorer < Arc < NetworkGraph < Arc < L > > > , Arc < L > > > >
509
+ > > ,
510
+ Arc < L >
511
+ > ;
499
512
500
513
/// SimpleRefChannelManager is a type alias for a ChannelManager reference, and is the reference
501
514
/// counterpart to the SimpleArcChannelManager type alias. Use this type by default when you don't
502
515
/// need a ChannelManager with a static lifetime. You'll need a static lifetime in cases such as
503
516
/// usage of lightning-net-tokio (since tokio::spawn requires parameters with static lifetimes).
504
517
/// But if this is not necessary, using a reference is more efficient. Defining these type aliases
505
- /// helps with issues such as long function definitions. Note that the ChannelManager can take any
506
- /// type that implements KeysInterface for its keys manager, but this type alias chooses the
507
- /// concrete type of the KeysManager.
518
+ /// issues such as overly long function definitions. Note that the ChannelManager can take any type
519
+ /// that implements KeysInterface or Router for its keys manager and router, respectively, but this
520
+ /// type alias chooses the concrete types of KeysManager and DefaultRouter .
508
521
///
509
522
/// (C-not exported) as Arcs don't make sense in bindings
510
- pub type SimpleRefChannelManager < ' a , ' b , ' c , ' d , ' e , ' f , M , T , F , R , L > = ChannelManager < & ' a M , & ' b T , & ' c KeysManager , & ' d F , & ' e R , & ' f L > ;
523
+ pub type SimpleRefChannelManager < ' a , ' b , ' c , ' d , ' e , ' f , ' g , ' h , M , T , F , L > = ChannelManager < & ' a M , & ' b T , & ' c KeysManager , & ' d F , & ' e DefaultRouter < & ' f NetworkGraph < & ' g L > , & ' g L , & ' h Mutex < ProbabilisticScorer < & ' f NetworkGraph < & ' g L > , & ' g L > > > , & ' g L > ;
511
524
512
525
/// Manager which keeps track of a number of channels and sends messages to the appropriate
513
526
/// channel, also tracking HTLC preimages and forwarding onion packets appropriately.
0 commit comments