X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Foutbound_payment.rs;h=e66f0bc25b99beaa3f36e6ac07b65e2007a69ea5;hb=ac690e8191aadd7e726f48bb7814941f655d404b;hp=2f520fa71956577d14a2ba475e0d02a883b27304;hpb=ec55730959103b71417d23d3a77011ca7d7d4ee5;p=rust-lightning diff --git a/lightning/src/ln/outbound_payment.rs b/lightning/src/ln/outbound_payment.rs index 2f520fa7..e66f0bc2 100644 --- a/lightning/src/ln/outbound_payment.rs +++ b/lightning/src/ln/outbound_payment.rs @@ -13,7 +13,7 @@ use bitcoin::hashes::Hash; use bitcoin::hashes::sha256::Hash as Sha256; use bitcoin::secp256k1::{self, Secp256k1, SecretKey}; -use crate::chain::keysinterface::{KeysInterface, Recipient}; +use crate::chain::keysinterface::{EntropySource, KeysInterface, NodeSigner, Recipient}; use crate::ln::{PaymentHash, PaymentPreimage, PaymentSecret}; use crate::ln::channelmanager::{HTLCSource, IDEMPOTENCY_TIMEOUT_TICKS, PaymentId}; use crate::ln::msgs::DecodeError; @@ -80,14 +80,14 @@ impl PendingOutboundPayment { _ => false, } } - pub(super) fn get_pending_fee_msat(&self) -> Option { + fn get_pending_fee_msat(&self) -> Option { match self { PendingOutboundPayment::Retryable { pending_fee_msat, .. } => pending_fee_msat.clone(), _ => None, } } - pub(super) fn payment_hash(&self) -> Option { + fn payment_hash(&self) -> Option { match self { PendingOutboundPayment::Legacy { .. } => None, PendingOutboundPayment::Retryable { payment_hash, .. } => Some(*payment_hash), @@ -96,7 +96,7 @@ impl PendingOutboundPayment { } } - pub(super) fn mark_fulfilled(&mut self) { + fn mark_fulfilled(&mut self) { let mut session_privs = HashSet::new(); core::mem::swap(&mut session_privs, match self { PendingOutboundPayment::Legacy { session_privs } | @@ -109,7 +109,7 @@ impl PendingOutboundPayment { *self = PendingOutboundPayment::Fulfilled { session_privs, payment_hash, timer_ticks_without_htlcs: 0 }; } - pub(super) fn mark_abandoned(&mut self) -> Result<(), ()> { + fn mark_abandoned(&mut self) -> Result<(), ()> { let mut session_privs = HashSet::new(); let our_payment_hash; core::mem::swap(&mut session_privs, match self { @@ -127,7 +127,7 @@ impl PendingOutboundPayment { } /// panics if path is None and !self.is_fulfilled - pub(super) fn remove(&mut self, session_priv: &[u8; 32], path: Option<&Vec>) -> bool { + fn remove(&mut self, session_priv: &[u8; 32], path: Option<&Vec>) -> bool { let remove_res = match self { PendingOutboundPayment::Legacy { session_privs } | PendingOutboundPayment::Retryable { session_privs, .. } | @@ -271,7 +271,7 @@ impl OutboundPayments { } } - pub(super) fn send_payment( + pub(super) fn send_payment_with_route( &self, route: &Route, payment_hash: PaymentHash, payment_secret: &Option, 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( + pub(super) fn retry_payment_with_route( &self, route: &Route, payment_id: PaymentId, keys_manager: &K, best_block_height: u32, send_payment_along_path: F ) -> Result<(), PaymentSendFailure>