@@ -26,7 +26,7 @@ use crate::{
2626 create_n_nodes_network, establish_channel_between_nodes, init_tracing, ChannelParameters ,
2727 NetworkNode , MIN_RESERVED_CKB ,
2828 } ,
29- NetworkServiceEvent , HUGE_CKB_AMOUNT ,
29+ MppMode , NetworkServiceEvent , HUGE_CKB_AMOUNT ,
3030} ;
3131
3232#[ tokio:: test( flavor = "multi_thread" , worker_threads = 4 ) ]
@@ -1998,7 +1998,13 @@ async fn test_send_mpp_dry_run_will_be_ok_with_single_path() {
19981998 . await ;
19991999 let [ node_0, _node_1, mut node_2] = nodes. try_into ( ) . expect ( "ok nodes" ) ;
20002000 let res = node_0
2001- . send_mpp_payment_with_dry_run_option ( & mut node_2, amount, None , true )
2001+ . send_mpp_payment_with_dry_run_option (
2002+ & mut node_2,
2003+ amount,
2004+ None ,
2005+ true ,
2006+ MppMode :: BasicMpp ,
2007+ )
20022008 . await ;
20032009
20042010 if let Some ( count) = expect_routers_count {
@@ -2040,7 +2046,13 @@ async fn test_send_mpp_direct_channels_dry_run() {
20402046 let [ node_0, mut node_1, _node_2] = nodes. try_into ( ) . expect ( "ok nodes" ) ;
20412047
20422048 let res = node_0
2043- . send_mpp_payment_with_dry_run_option ( & mut node_1, amount, None , true )
2049+ . send_mpp_payment_with_dry_run_option (
2050+ & mut node_1,
2051+ amount,
2052+ None ,
2053+ true ,
2054+ MppMode :: BasicMpp ,
2055+ )
20442056 . await ;
20452057
20462058 if let Some ( count) = expect_routers_count {
@@ -2085,7 +2097,13 @@ async fn test_send_mpp_dry_run_single_path_mixed_with_multiple_paths() {
20852097 . await ;
20862098 let [ node_0, _node_1, mut node_2] = nodes. try_into ( ) . expect ( "ok nodes" ) ;
20872099 let res = node_0
2088- . send_mpp_payment_with_dry_run_option ( & mut node_2, amount, None , true )
2100+ . send_mpp_payment_with_dry_run_option (
2101+ & mut node_2,
2102+ amount,
2103+ None ,
2104+ true ,
2105+ MppMode :: BasicMpp ,
2106+ )
20892107 . await ;
20902108
20912109 if let Some ( count) = expect_routers_count {
@@ -2135,7 +2153,7 @@ async fn test_send_mpp_will_succeed_with_retry_first_hops() {
21352153 let [ node_0, mut node_1] = nodes. try_into ( ) . expect ( "ok nodes" ) ;
21362154
21372155 let res = node_0
2138- . send_mpp_payment_with_dry_run_option ( & mut node_1, 300000 , None , true )
2156+ . send_mpp_payment_with_dry_run_option ( & mut node_1, 300000 , None , true , MppMode :: BasicMpp )
21392157 . await ;
21402158
21412159 let query_res = res. unwrap ( ) ;
@@ -2190,7 +2208,7 @@ async fn test_send_mpp_will_succeed_with_retry_2_channels() {
21902208 let [ node_0, mut node_1] = nodes. try_into ( ) . expect ( "ok nodes" ) ;
21912209
21922210 let res = node_0
2193- . send_mpp_payment_with_dry_run_option ( & mut node_1, 300000 , None , true )
2211+ . send_mpp_payment_with_dry_run_option ( & mut node_1, 300000 , None , true , MppMode :: BasicMpp )
21942212 . await ;
21952213
21962214 let query_res = res. unwrap ( ) ;
@@ -2247,7 +2265,7 @@ async fn test_send_mpp_will_fail_with_retry_3_channels() {
22472265 let [ node_0, mut node_1] = nodes. try_into ( ) . expect ( "ok nodes" ) ;
22482266
22492267 let res = node_0
2250- . send_mpp_payment_with_dry_run_option ( & mut node_1, 300000 , None , true )
2268+ . send_mpp_payment_with_dry_run_option ( & mut node_1, 300000 , None , true , MppMode :: BasicMpp )
22512269 . await ;
22522270
22532271 let query_res = res. unwrap ( ) ;
@@ -2293,7 +2311,7 @@ async fn test_send_mpp_will_success_with_retry_split_channels() {
22932311 let [ node_0, mut node_1] = nodes. try_into ( ) . expect ( "ok nodes" ) ;
22942312
22952313 let res = node_0
2296- . send_mpp_payment_with_dry_run_option ( & mut node_1, 300000 , None , true )
2314+ . send_mpp_payment_with_dry_run_option ( & mut node_1, 300000 , None , true , MppMode :: BasicMpp )
22972315 . await ;
22982316
22992317 let query_res = res. unwrap ( ) ;
@@ -2339,7 +2357,7 @@ async fn test_send_mpp_will_fail_with_disable_single_path() {
23392357 let [ node_0, _node_1, mut node_2] = nodes. try_into ( ) . expect ( "ok nodes" ) ;
23402358
23412359 let res = node_0
2342- . send_mpp_payment_with_dry_run_option ( & mut node_2, 30000 , None , true )
2360+ . send_mpp_payment_with_dry_run_option ( & mut node_2, 30000 , None , true , MppMode :: BasicMpp )
23432361 . await ;
23442362
23452363 let query_res = res. unwrap ( ) ;
@@ -2390,7 +2408,7 @@ async fn test_send_mpp_will_success_with_middle_hop_capacity_not_enough() {
23902408 let [ node_0, _node_1, mut node_2] = nodes. try_into ( ) . expect ( "ok nodes" ) ;
23912409
23922410 let res = node_0
2393- . send_mpp_payment_with_dry_run_option ( & mut node_2, 300000 , None , true )
2411+ . send_mpp_payment_with_dry_run_option ( & mut node_2, 300000 , None , true , MppMode :: BasicMpp )
23942412 . await ;
23952413
23962414 let query_res = res. unwrap ( ) ;
@@ -3163,6 +3181,7 @@ async fn test_send_payment_custom_records_not_in_range() {
31633181 max_parts : Some ( 2 ) ,
31643182 ..Default :: default ( )
31653183 } ,
3184+ MppMode :: BasicMpp ,
31663185 )
31673186 . await ;
31683187
@@ -3188,7 +3207,13 @@ async fn test_mpp_can_not_find_path_filter_target_node_features() {
31883207 let [ mut node_0, mut node_1] = nodes. try_into ( ) . expect ( "2 nodes" ) ;
31893208
31903209 let res = node_0
3191- . send_mpp_payment_with_dry_run_option ( & mut node_1, 20000000000 , Some ( 2 ) , true )
3210+ . send_mpp_payment_with_dry_run_option (
3211+ & mut node_1,
3212+ 20000000000 ,
3213+ Some ( 2 ) ,
3214+ true ,
3215+ MppMode :: BasicMpp ,
3216+ )
31923217 . await ;
31933218 eprintln ! ( "query res: {:?}" , res) ;
31943219
@@ -3202,7 +3227,13 @@ async fn test_mpp_can_not_find_path_filter_target_node_features() {
32023227 . await ;
32033228
32043229 let res = node_0
3205- . send_mpp_payment_with_dry_run_option ( & mut node_1, 20000000000 , Some ( 2 ) , true )
3230+ . send_mpp_payment_with_dry_run_option (
3231+ & mut node_1,
3232+ 20000000000 ,
3233+ Some ( 2 ) ,
3234+ true ,
3235+ MppMode :: BasicMpp ,
3236+ )
32063237 . await ;
32073238 eprintln ! ( "query res: {:?}" , res) ;
32083239
@@ -3312,6 +3343,7 @@ async fn test_mpp_can_not_find_path_filter_middle_node_features() {
33123343 200 * CKB_SHANNONS as u128 ,
33133344 Some ( 2 ) ,
33143345 true ,
3346+ MppMode :: BasicMpp ,
33153347 )
33163348 . await ;
33173349 eprintln ! ( "query res: {:?}" , res) ;
@@ -3342,6 +3374,7 @@ async fn test_mpp_can_not_find_path_filter_middle_node_features() {
33423374 200 * CKB_SHANNONS as u128 ,
33433375 Some ( 2 ) ,
33443376 true ,
3377+ MppMode :: BasicMpp ,
33453378 )
33463379 . await ;
33473380 eprintln ! ( "query res: {:?}" , res) ;
@@ -3530,14 +3563,14 @@ async fn test_send_mpp_respect_min_tlc_value() {
35303563 assert ! ( res. is_ok( ) ) ;
35313564
35323565 let res = node_0
3533- . send_mpp_payment_with_dry_run_option ( & mut node_2, 28000 , Some ( 3 ) , true )
3566+ . send_mpp_payment_with_dry_run_option ( & mut node_2, 28000 , Some ( 3 ) , true , MppMode :: BasicMpp )
35343567 . await ;
35353568
35363569 eprintln ! ( "res: {:?}" , res) ;
35373570 assert ! ( res. is_err( ) ) ;
35383571
35393572 let res = node_0
3540- . send_mpp_payment_with_dry_run_option ( & mut node_2, 30000 , None , true )
3573+ . send_mpp_payment_with_dry_run_option ( & mut node_2, 30000 , None , true , MppMode :: BasicMpp )
35413574 . await ;
35423575 debug ! ( "res: {:?}" , res) ;
35433576 assert ! ( res. is_ok( ) ) ;
0 commit comments