From 3e89cc7e085023b7e3c5ccd7f444700684e97dd2 Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Sun, 18 Dec 2022 18:28:01 -0500 Subject: [PATCH] Reduce visibility of outbound payment methods --- lightning/src/ln/outbound_payment.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lightning/src/ln/outbound_payment.rs b/lightning/src/ln/outbound_payment.rs index 2f520fa71..60c111b27 100644 --- a/lightning/src/ln/outbound_payment.rs +++ b/lightning/src/ln/outbound_payment.rs @@ -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, .. } | -- 2.39.5