@@ -4074,7 +4074,7 @@ mod tests {
40744074 // at the very first hop.
40754075 //
40764076 // Specifically, this interacted with our "all paths must fund at least 5% of total target"
4077- // criteria to cause us to refuse all routes at the last hop hint which would be considered
4077+ // criterion to cause us to refuse all routes at the last hop hint which would be considered
40784078 // to only have the remaining to-collect amount in available liquidity.
40794079 //
40804080 // This bug appeared in production in some specific channel configurations.
@@ -4149,8 +4149,15 @@ mod tests {
41494149 // overpay at all.
41504150 let route = get_route ( & our_id, & payee, & network_graph, None , 100_000 , 42 , Arc :: clone ( & logger) , & scorer) . unwrap ( ) ;
41514151 assert_eq ! ( route. paths. len( ) , 2 ) ;
4152+ // Paths are somewhat randomly ordered, but:
4153+ // * the first is channel 2 (1 msat fee) -> channel 4 -> channel 42
4154+ // * the second is channel 1 (0 fee, but 99 sat maximum) -> channel 3 -> channel 42
41524155 assert_eq ! ( route. paths[ 0 ] [ 0 ] . short_channel_id, 2 ) ;
4156+ assert_eq ! ( route. paths[ 0 ] [ 0 ] . fee_msat, 1 ) ;
4157+ assert_eq ! ( route. paths[ 0 ] [ 2 ] . fee_msat, 1_000 ) ;
41534158 assert_eq ! ( route. paths[ 1 ] [ 0 ] . short_channel_id, 1 ) ;
4159+ assert_eq ! ( route. paths[ 1 ] [ 0 ] . fee_msat, 0 ) ;
4160+ assert_eq ! ( route. paths[ 1 ] [ 2 ] . fee_msat, 99_000 ) ;
41544161 assert_eq ! ( route. get_total_fees( ) , 1 ) ;
41554162 assert_eq ! ( route. get_total_amount( ) , 100_000 ) ;
41564163 }
0 commit comments