@@ -481,6 +481,8 @@ pub const DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA: u32 = 1008;
481
481
// limits, but for now more than 10 paths likely carries too much one-path failure.
482
482
pub const DEFAULT_MAX_PATH_COUNT : u8 = 10 ;
483
483
484
+ const DEFAULT_MAX_CHANNEL_SATURATION_POW_HALF : u8 = 2 ;
485
+
484
486
// The median hop CLTV expiry delta currently seen in the network.
485
487
const MEDIAN_HOP_CLTV_EXPIRY_DELTA : u32 = 40 ;
486
488
@@ -567,7 +569,7 @@ impl ReadableArgs<u32> for PaymentParameters {
567
569
( 2 , features, ( option: ReadableArgs , payee_pubkey. is_some( ) ) ) ,
568
570
( 3 , max_path_count, ( default_value, DEFAULT_MAX_PATH_COUNT ) ) ,
569
571
( 4 , route_hints, vec_type) ,
570
- ( 5 , max_channel_saturation_power_of_half, ( default_value, 2 ) ) ,
572
+ ( 5 , max_channel_saturation_power_of_half, ( default_value, DEFAULT_MAX_CHANNEL_SATURATION_POW_HALF ) ) ,
571
573
( 6 , expiry_time, option) ,
572
574
( 7 , previously_failed_channels, vec_type) ,
573
575
( 8 , blinded_route_hints, optional_vec) ,
@@ -612,7 +614,7 @@ impl PaymentParameters {
612
614
expiry_time : None ,
613
615
max_total_cltv_expiry_delta : DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA ,
614
616
max_path_count : DEFAULT_MAX_PATH_COUNT ,
615
- max_channel_saturation_power_of_half : 2 ,
617
+ max_channel_saturation_power_of_half : DEFAULT_MAX_CHANNEL_SATURATION_POW_HALF ,
616
618
previously_failed_channels : Vec :: new ( ) ,
617
619
}
618
620
}
@@ -641,7 +643,7 @@ impl PaymentParameters {
641
643
expiry_time : None ,
642
644
max_total_cltv_expiry_delta : DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA ,
643
645
max_path_count : DEFAULT_MAX_PATH_COUNT ,
644
- max_channel_saturation_power_of_half : 2 ,
646
+ max_channel_saturation_power_of_half : DEFAULT_MAX_CHANNEL_SATURATION_POW_HALF ,
645
647
previously_failed_channels : Vec :: new ( ) ,
646
648
}
647
649
}
0 commit comments