mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 15:02:20 +01:00
Rename send_payment and retry_payment for retries
Once ChannelManager supports payment retries, it will make more sense for its current send_payment method to be named send_payment_with_route because retrying should be the default. Here we get a head start on this by making the rename in outbound_payment, but not changing the public interface yet.
This commit is contained in:
parent
3e89cc7e08
commit
afdaa64b44
2 changed files with 4 additions and 4 deletions
|
@ -2370,7 +2370,7 @@ impl<M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelManager<M, T, K, F
|
|||
pub fn send_payment(&self, route: &Route, payment_hash: PaymentHash, payment_secret: &Option<PaymentSecret>, payment_id: PaymentId) -> Result<(), PaymentSendFailure> {
|
||||
let best_block_height = self.best_block.read().unwrap().height();
|
||||
self.pending_outbound_payments
|
||||
.send_payment(route, payment_hash, payment_secret, payment_id, &self.keys_manager, best_block_height,
|
||||
.send_payment_with_route(route, payment_hash, payment_secret, payment_id, &self.keys_manager, best_block_height,
|
||||
|path, payment_params, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv|
|
||||
self.send_payment_along_path(path, payment_params, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv))
|
||||
}
|
||||
|
@ -2402,7 +2402,7 @@ impl<M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelManager<M, T, K, F
|
|||
/// [`abandon_payment`]: [`ChannelManager::abandon_payment`]
|
||||
pub fn retry_payment(&self, route: &Route, payment_id: PaymentId) -> Result<(), PaymentSendFailure> {
|
||||
let best_block_height = self.best_block.read().unwrap().height();
|
||||
self.pending_outbound_payments.retry_payment(route, payment_id, &self.keys_manager, best_block_height,
|
||||
self.pending_outbound_payments.retry_payment_with_route(route, payment_id, &self.keys_manager, best_block_height,
|
||||
|path, payment_params, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv|
|
||||
self.send_payment_along_path(path, payment_params, payment_hash, payment_secret, total_value, cur_height, payment_id, keysend_preimage, session_priv))
|
||||
}
|
||||
|
|
|
@ -271,7 +271,7 @@ impl OutboundPayments {
|
|||
}
|
||||
}
|
||||
|
||||
pub(super) fn send_payment<K: Deref, F>(
|
||||
pub(super) fn send_payment_with_route<K: Deref, F>(
|
||||
&self, route: &Route, payment_hash: PaymentHash, payment_secret: &Option<PaymentSecret>,
|
||||
payment_id: PaymentId, keys_manager: &K, best_block_height: u32, send_payment_along_path: F
|
||||
) -> Result<(), PaymentSendFailure>
|
||||
|
@ -306,7 +306,7 @@ impl OutboundPayments {
|
|||
}
|
||||
}
|
||||
|
||||
pub(super) fn retry_payment<K: Deref, F>(
|
||||
pub(super) fn retry_payment_with_route<K: Deref, F>(
|
||||
&self, route: &Route, payment_id: PaymentId, keys_manager: &K, best_block_height: u32,
|
||||
send_payment_along_path: F
|
||||
) -> Result<(), PaymentSendFailure>
|
||||
|
|
Loading…
Add table
Reference in a new issue