@@ -14,7 +14,7 @@ use bitcoin::hashes::sha256::Hash as Sha256;
1414use bitcoin:: secp256k1:: { self , Secp256k1 , SecretKey } ;
1515
1616use crate :: blinded_path:: { IntroductionNode , NodeIdLookUp } ;
17- use crate :: events:: { self , PaymentFailureReason } ;
17+ use crate :: events:: { self , PaymentFailureReason , PaidInvoice } ;
1818use crate :: types:: payment:: { PaymentHash , PaymentPreimage , PaymentSecret } ;
1919use crate :: ln:: channel_state:: ChannelDetails ;
2020use crate :: ln:: channelmanager:: { EventCompletionAction , HTLCSource , PaymentId } ;
@@ -24,7 +24,6 @@ use crate::ln::onion_utils::{DecodedOnionFailure, HTLCFailReason};
2424use crate :: offers:: invoice:: Bolt12Invoice ;
2525use crate :: offers:: invoice_request:: InvoiceRequest ;
2626use crate :: offers:: nonce:: Nonce ;
27- use crate :: offers:: OfferInvoice ;
2827use crate :: routing:: router:: { BlindedTail , InFlightHtlcs , RouteParametersConfig , Path , PaymentParameters , Route , RouteParameters , Router } ;
2928use crate :: sign:: { EntropySource , NodeSigner , Recipient } ;
3029use crate :: util:: errors:: APIError ;
@@ -108,7 +107,7 @@ pub(crate) enum PendingOutboundPayment {
108107 invoice_request : Option < InvoiceRequest > ,
109108 // Storing the bolt12 invoice here to allow Proof of Payment after
110109 // the payment is made.
111- bolt12_invoice : Option < OfferInvoice > ,
110+ bolt12_invoice : Option < PaidInvoice > ,
112111 custom_tlvs : Vec < ( u64 , Vec < u8 > ) > ,
113112 pending_amt_msat : u64 ,
114113 /// Used to track the fee paid. Present iff the payment was serialized on 0.0.103+.
@@ -158,7 +157,7 @@ impl_writeable_tlv_based!(RetryableInvoiceRequest, {
158157} ) ;
159158
160159impl PendingOutboundPayment {
161- fn bolt12_invoice ( & self ) -> Option < & OfferInvoice > {
160+ fn bolt12_invoice ( & self ) -> Option < & PaidInvoice > {
162161 match self {
163162 PendingOutboundPayment :: Retryable { bolt12_invoice, .. } => bolt12_invoice. as_ref ( ) ,
164163 _ => None ,
@@ -907,7 +906,7 @@ impl OutboundPayments {
907906 if let Some ( max_fee_msat) = params_config. max_total_routing_fee_msat {
908907 route_params. max_total_routing_fee_msat = Some ( max_fee_msat) ;
909908 }
910- let invoice = OfferInvoice :: Bolt12Invoice ( invoice. clone ( ) ) ;
909+ let invoice = PaidInvoice :: Bolt12Invoice ( invoice. clone ( ) ) ;
911910 self . send_payment_for_bolt12_invoice_internal (
912911 payment_id, payment_hash, None , None , Some ( & invoice) , route_params, retry_strategy, router, first_hops,
913912 inflight_htlcs, entropy_source, node_signer, node_id_lookup, secp_ctx, best_block_height,
@@ -920,7 +919,7 @@ impl OutboundPayments {
920919 > (
921920 & self , payment_id : PaymentId , payment_hash : PaymentHash ,
922921 keysend_preimage : Option < PaymentPreimage > , invoice_request : Option < & InvoiceRequest > ,
923- bolt12_invoice : Option < & OfferInvoice > ,
922+ bolt12_invoice : Option < & PaidInvoice > ,
924923 mut route_params : RouteParameters , retry_strategy : Retry , router : & R ,
925924 first_hops : Vec < ChannelDetails > , inflight_htlcs : IH , entropy_source : & ES , node_signer : & NS ,
926925 node_id_lookup : & NL , secp_ctx : & Secp256k1 < secp256k1:: All > , best_block_height : u32 , logger : & L ,
@@ -1667,7 +1666,7 @@ impl OutboundPayments {
16671666 & self , payment_hash : PaymentHash , recipient_onion : RecipientOnionFields , payment_id : PaymentId ,
16681667 keysend_preimage : Option < PaymentPreimage > , route : & Route , retry_strategy : Option < Retry > ,
16691668 payment_params : Option < PaymentParameters > , entropy_source : & ES , best_block_height : u32 ,
1670- bolt12_invoice : Option < OfferInvoice >
1669+ bolt12_invoice : Option < PaidInvoice >
16711670 ) -> Result < Vec < [ u8 ; 32 ] > , PaymentSendFailure > where ES :: Target : EntropySource {
16721671 let mut pending_outbounds = self . pending_outbound_payments . lock ( ) . unwrap ( ) ;
16731672 match pending_outbounds. entry ( payment_id) {
@@ -1686,7 +1685,7 @@ impl OutboundPayments {
16861685 fn create_pending_payment < ES : Deref > (
16871686 payment_hash : PaymentHash , recipient_onion : RecipientOnionFields ,
16881687 keysend_preimage : Option < PaymentPreimage > , invoice_request : Option < InvoiceRequest > ,
1689- bolt12_invoice : Option < OfferInvoice > , route : & Route , retry_strategy : Option < Retry > ,
1688+ bolt12_invoice : Option < PaidInvoice > , route : & Route , retry_strategy : Option < Retry > ,
16901689 payment_params : Option < PaymentParameters > , entropy_source : & ES , best_block_height : u32
16911690 ) -> ( PendingOutboundPayment , Vec < [ u8 ; 32 ] > )
16921691 where
0 commit comments