@@ -2408,12 +2408,12 @@ where
24082408	} 
24092409
24102410	#[ cfg( test) ]  
2411- 	pub ( crate )  fn  test_send_payment_along_path ( & self ,  path :  & Vec < RouteHop > ,  payment_params :   & Option < PaymentParameters > ,   payment_hash :  & PaymentHash ,  payment_secret :  & Option < PaymentSecret > ,  total_value :  u64 ,  cur_height :  u32 ,  payment_id :  PaymentId ,  keysend_preimage :  & Option < PaymentPreimage > ,  session_priv_bytes :  [ u8 ;  32 ] )  -> Result < ( ) ,  APIError >  { 
2411+ 	pub ( crate )  fn  test_send_payment_along_path ( & self ,  path :  & Vec < RouteHop > ,  payment_hash :  & PaymentHash ,  payment_secret :  & Option < PaymentSecret > ,  total_value :  u64 ,  cur_height :  u32 ,  payment_id :  PaymentId ,  keysend_preimage :  & Option < PaymentPreimage > ,  session_priv_bytes :  [ u8 ;  32 ] )  -> Result < ( ) ,  APIError >  { 
24122412		let  _lck = self . total_consistency_lock . read ( ) . unwrap ( ) ; 
2413- 		self . send_payment_along_path ( path,  payment_params ,   payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv_bytes) 
2413+ 		self . send_payment_along_path ( path,  payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv_bytes) 
24142414	} 
24152415
2416- 	fn  send_payment_along_path ( & self ,  path :  & Vec < RouteHop > ,  payment_params :   & Option < PaymentParameters > ,   payment_hash :  & PaymentHash ,  payment_secret :  & Option < PaymentSecret > ,  total_value :  u64 ,  cur_height :  u32 ,  payment_id :  PaymentId ,  keysend_preimage :  & Option < PaymentPreimage > ,  session_priv_bytes :  [ u8 ;  32 ] )  -> Result < ( ) ,  APIError >  { 
2416+ 	fn  send_payment_along_path ( & self ,  path :  & Vec < RouteHop > ,  payment_hash :  & PaymentHash ,  payment_secret :  & Option < PaymentSecret > ,  total_value :  u64 ,  cur_height :  u32 ,  payment_id :  PaymentId ,  keysend_preimage :  & Option < PaymentPreimage > ,  session_priv_bytes :  [ u8 ;  32 ] )  -> Result < ( ) ,  APIError >  { 
24172417		// The top-level caller should hold the total_consistency_lock read lock. 
24182418		debug_assert ! ( self . total_consistency_lock. try_write( ) . is_err( ) ) ; 
24192419
@@ -2557,8 +2557,8 @@ where
25572557		let  _persistence_guard = PersistenceNotifierGuard :: notify_on_drop ( & self . total_consistency_lock ,  & self . persistence_notifier ) ; 
25582558		self . pending_outbound_payments 
25592559			. send_payment_with_route ( route,  payment_hash,  payment_secret,  payment_id,  & self . entropy_source ,  & self . node_signer ,  best_block_height, 
2560- 				|path,  payment_params ,   payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv|
2561- 				self . send_payment_along_path ( path,  payment_params ,   payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv) ) 
2560+ 				|path,  payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv|
2561+ 				self . send_payment_along_path ( path,  payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv) ) 
25622562	} 
25632563
25642564	/// Similar to [`ChannelManager::send_payment`], but will automatically find a route based on 
@@ -2571,17 +2571,17 @@ where
25712571				& self . router ,  self . list_usable_channels ( ) ,  || self . compute_inflight_htlcs ( ) , 
25722572				& self . entropy_source ,  & self . node_signer ,  best_block_height,  & self . logger , 
25732573				& self . pending_events , 
2574- 				|path,  payment_params ,   payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv|
2575- 				self . send_payment_along_path ( path,  payment_params ,   payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv) ) 
2574+ 				|path,  payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv|
2575+ 				self . send_payment_along_path ( path,  payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv) ) 
25762576	} 
25772577
25782578	#[ cfg( test) ]  
25792579	fn  test_send_payment_internal ( & self ,  route :  & Route ,  payment_hash :  PaymentHash ,  payment_secret :  & Option < PaymentSecret > ,  keysend_preimage :  Option < PaymentPreimage > ,  payment_id :  PaymentId ,  recv_value_msat :  Option < u64 > ,  onion_session_privs :  Vec < [ u8 ;  32 ] > )  -> Result < ( ) ,  PaymentSendFailure >  { 
25802580		let  best_block_height = self . best_block . read ( ) . unwrap ( ) . height ( ) ; 
25812581		let  _persistence_guard = PersistenceNotifierGuard :: notify_on_drop ( & self . total_consistency_lock ,  & self . persistence_notifier ) ; 
25822582		self . pending_outbound_payments . test_send_payment_internal ( route,  payment_hash,  payment_secret,  keysend_preimage,  payment_id,  recv_value_msat,  onion_session_privs,  & self . node_signer ,  best_block_height, 
2583- 			|path,  payment_params ,   payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv|
2584- 			self . send_payment_along_path ( path,  payment_params ,   payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv) ) 
2583+ 			|path,  payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv|
2584+ 			self . send_payment_along_path ( path,  payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv) ) 
25852585	} 
25862586
25872587	#[ cfg( test) ]  
@@ -2633,8 +2633,8 @@ where
26332633		self . pending_outbound_payments . send_spontaneous_payment_with_route ( 
26342634			route,  payment_preimage,  payment_id,  & self . entropy_source ,  & self . node_signer , 
26352635			best_block_height, 
2636- 			|path,  payment_params ,   payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv|
2637- 			self . send_payment_along_path ( path,  payment_params ,   payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv) ) 
2636+ 			|path,  payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv|
2637+ 			self . send_payment_along_path ( path,  payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv) ) 
26382638	} 
26392639
26402640	/// Similar to [`ChannelManager::send_spontaneous_payment`], but will automatically find a route 
@@ -2651,8 +2651,8 @@ where
26512651			retry_strategy,  route_params,  & self . router ,  self . list_usable_channels ( ) , 
26522652			|| self . compute_inflight_htlcs ( ) ,   & self . entropy_source ,  & self . node_signer ,  best_block_height, 
26532653			& self . logger ,  & self . pending_events , 
2654- 			|path,  payment_params ,   payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv|
2655- 			self . send_payment_along_path ( path,  payment_params ,   payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv) ) 
2654+ 			|path,  payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv|
2655+ 			self . send_payment_along_path ( path,  payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv) ) 
26562656	} 
26572657
26582658	/// Send a payment that is probing the given route for liquidity. We calculate the 
@@ -2662,8 +2662,8 @@ where
26622662		let  best_block_height = self . best_block . read ( ) . unwrap ( ) . height ( ) ; 
26632663		let  _persistence_guard = PersistenceNotifierGuard :: notify_on_drop ( & self . total_consistency_lock ,  & self . persistence_notifier ) ; 
26642664		self . pending_outbound_payments . send_probe ( hops,  self . probing_cookie_secret ,  & self . entropy_source ,  & self . node_signer ,  best_block_height, 
2665- 			|path,  payment_params ,   payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv|
2666- 			self . send_payment_along_path ( path,  payment_params ,   payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv) ) 
2665+ 			|path,  payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv|
2666+ 			self . send_payment_along_path ( path,  payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv) ) 
26672667	} 
26682668
26692669	/// Returns whether a payment with the given [`PaymentHash`] and [`PaymentId`] is, in fact, a 
@@ -3387,8 +3387,8 @@ where
33873387		self . pending_outbound_payments . check_retry_payments ( & self . router ,  || self . list_usable_channels ( ) , 
33883388			|| self . compute_inflight_htlcs ( ) ,  & self . entropy_source ,  & self . node_signer ,  best_block_height, 
33893389			& self . pending_events ,  & self . logger , 
3390- 			|path,  payment_params ,   payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv|
3391- 			self . send_payment_along_path ( path,  payment_params ,   payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv) ) ; 
3390+ 			|path,  payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv|
3391+ 			self . send_payment_along_path ( path,  payment_hash,  payment_secret,  total_value,  cur_height,  payment_id,  keysend_preimage,  session_priv) ) ; 
33923392
33933393		for  ( htlc_source,  payment_hash,  failure_reason,  destination)  in  failed_forwards. drain ( ..)  { 
33943394			self . fail_htlc_backwards_internal ( & htlc_source,  & payment_hash,  & failure_reason,  destination) ; 
@@ -7876,7 +7876,7 @@ mod tests {
78767876		// indicates there are more HTLCs coming. 
78777877		let  cur_height = CHAN_CONFIRM_DEPTH  + 1 ;  // route_payment calls send_payment, which adds 1 to the current height. So we do the same here to match. 
78787878		let  session_privs = nodes[ 0 ] . node . test_add_new_pending_payment ( our_payment_hash,  Some ( payment_secret) ,  payment_id,  & mpp_route) . unwrap ( ) ; 
7879- 		nodes[ 0 ] . node . test_send_payment_along_path ( & mpp_route. paths [ 0 ] ,  & route . payment_params ,   & our_payment_hash,  & Some ( payment_secret) ,  200_000 ,  cur_height,  payment_id,  & None ,  session_privs[ 0 ] ) . unwrap ( ) ; 
7879+ 		nodes[ 0 ] . node . test_send_payment_along_path ( & mpp_route. paths [ 0 ] ,  & our_payment_hash,  & Some ( payment_secret) ,  200_000 ,  cur_height,  payment_id,  & None ,  session_privs[ 0 ] ) . unwrap ( ) ; 
78807880		check_added_monitors ! ( nodes[ 0 ] ,  1 ) ; 
78817881		let  mut  events = nodes[ 0 ] . node . get_and_clear_pending_msg_events ( ) ; 
78827882		assert_eq ! ( events. len( ) ,  1 ) ; 
@@ -7906,7 +7906,7 @@ mod tests {
79067906		expect_payment_failed ! ( nodes[ 0 ] ,  our_payment_hash,  true ) ; 
79077907
79087908		// Send the second half of the original MPP payment. 
7909- 		nodes[ 0 ] . node . test_send_payment_along_path ( & mpp_route. paths [ 1 ] ,  & route . payment_params ,   & our_payment_hash,  & Some ( payment_secret) ,  200_000 ,  cur_height,  payment_id,  & None ,  session_privs[ 1 ] ) . unwrap ( ) ; 
7909+ 		nodes[ 0 ] . node . test_send_payment_along_path ( & mpp_route. paths [ 1 ] ,  & our_payment_hash,  & Some ( payment_secret) ,  200_000 ,  cur_height,  payment_id,  & None ,  session_privs[ 1 ] ) . unwrap ( ) ; 
79107910		check_added_monitors ! ( nodes[ 0 ] ,  1 ) ; 
79117911		let  mut  events = nodes[ 0 ] . node . get_and_clear_pending_msg_events ( ) ; 
79127912		assert_eq ! ( events. len( ) ,  1 ) ; 
0 commit comments