Skip to content

Commit 9455562

Browse files
refactor(offers): move Bolt12InvoiceType into payer_proof
Rename the old PaidBolt12Invoice enum to Bolt12InvoiceType, move it out of events, and update outbound payment plumbing to store the renamed invoice type directly.
1 parent eb45da9 commit 9455562

6 files changed

Lines changed: 40 additions & 50 deletions

File tree

lightning/src/events/mod.rs

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ use crate::ln::outbound_payment::RecipientOnionFields;
3131
use crate::ln::types::ChannelId;
3232
use crate::offers::invoice::Bolt12Invoice;
3333
use crate::offers::invoice_request::InvoiceRequest;
34+
use crate::offers::payer_proof::Bolt12InvoiceType;
3435
use crate::offers::static_invoice::StaticInvoice;
3536
use crate::onion_message::messenger::Responder;
3637
use crate::routing::gossip::NetworkUpdate;
@@ -1096,11 +1097,12 @@ pub enum Event {
10961097
/// showing the invoice and confirming that the payment hash matches
10971098
/// the hash of the payment preimage.
10981099
///
1099-
/// However, the [`PaidBolt12Invoice`] can also be of type [`StaticInvoice`], which
1100+
/// However, the [`Bolt12InvoiceType`] can also be of type [`StaticInvoice`], which
11001101
/// is a special [`Bolt12Invoice`] where proof of payment is not possible.
11011102
///
1103+
/// [`Bolt12InvoiceType`]: crate::offers::payer_proof::Bolt12InvoiceType
11021104
/// [`StaticInvoice`]: crate::offers::static_invoice::StaticInvoice
1103-
bolt12_invoice: Option<PaidBolt12Invoice>,
1105+
bolt12_invoice: Option<Bolt12InvoiceType>,
11041106
},
11051107
/// Indicates an outbound payment failed. Individual [`Event::PaymentPathFailed`] events
11061108
/// provide failure information for each path attempt in the payment, including retries.
@@ -3146,19 +3148,3 @@ impl<T: EventHandler> EventHandler for Arc<T> {
31463148
self.deref().handle_event(event)
31473149
}
31483150
}
3149-
3150-
/// The BOLT 12 invoice that was paid, surfaced in [`Event::PaymentSent::bolt12_invoice`].
3151-
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
3152-
pub enum PaidBolt12Invoice {
3153-
/// The BOLT 12 invoice specified by the BOLT 12 specification,
3154-
/// allowing the user to perform proof of payment.
3155-
Bolt12Invoice(Bolt12Invoice),
3156-
/// The Static invoice, used in the async payment specification update proposal,
3157-
/// where the user cannot perform proof of payment.
3158-
StaticInvoice(StaticInvoice),
3159-
}
3160-
3161-
impl_writeable_tlv_based_enum!(PaidBolt12Invoice,
3162-
{0, Bolt12Invoice} => (),
3163-
{2, StaticInvoice} => (),
3164-
);

lightning/src/ln/async_payments_tests.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::blinded_path::payment::{AsyncBolt12OfferContext, BlindedPaymentTlvs};
1414
use crate::blinded_path::payment::{DummyTlvs, PaymentContext};
1515
use crate::chain::channelmonitor::{HTLC_FAIL_BACK_BUFFER, LATENCY_GRACE_PERIOD_BLOCKS};
1616
use crate::events::{
17-
Event, EventsProvider, HTLCHandlingFailureReason, HTLCHandlingFailureType, PaidBolt12Invoice,
17+
Event, EventsProvider, HTLCHandlingFailureReason, HTLCHandlingFailureType,
1818
PaymentFailureReason, PaymentPurpose,
1919
};
2020
use crate::ln::blinded_payment_tests::{fail_blinded_htlc_backwards, get_blinded_route_parameters};
@@ -42,6 +42,7 @@ use crate::offers::flow::{
4242
use crate::offers::invoice_request::InvoiceRequest;
4343
use crate::offers::nonce::Nonce;
4444
use crate::offers::offer::{Amount, Offer};
45+
use crate::offers::payer_proof::Bolt12InvoiceType;
4546
use crate::offers::static_invoice::{
4647
StaticInvoice, StaticInvoiceBuilder,
4748
DEFAULT_RELATIVE_EXPIRY as STATIC_INVOICE_DEFAULT_RELATIVE_EXPIRY,
@@ -991,7 +992,7 @@ fn ignore_duplicate_invoice() {
991992
let keysend_preimage = extract_payment_preimage(&claimable_ev);
992993
let (res, _) =
993994
claim_payment_along_route(ClaimAlongRouteArgs::new(sender, route, keysend_preimage));
994-
assert_eq!(res, Some(PaidBolt12Invoice::StaticInvoice(static_invoice.clone())));
995+
assert_eq!(res, Some(Bolt12InvoiceType::StaticInvoice(static_invoice.clone())));
995996

996997
// After paying the static invoice, check that regular invoice received from async recipient is ignored.
997998
match sender.onion_messenger.peel_onion_message(&invoice_om) {
@@ -1076,7 +1077,7 @@ fn ignore_duplicate_invoice() {
10761077

10771078
// After paying invoice, check that static invoice is ignored.
10781079
let res = claim_payment(sender, route[0], payment_preimage);
1079-
assert_eq!(res, Some(PaidBolt12Invoice::Bolt12Invoice(invoice)));
1080+
assert_eq!(res, Some(Bolt12InvoiceType::Bolt12Invoice(invoice)));
10801081

10811082
sender.onion_messenger.handle_onion_message(always_online_node_id, &static_invoice_om);
10821083
let async_pmts_msgs = AsyncPaymentsMessageHandler::release_pending_messages(sender.node);
@@ -1147,7 +1148,7 @@ fn async_receive_flow_success() {
11471148
let keysend_preimage = extract_payment_preimage(&claimable_ev);
11481149
let (res, _) =
11491150
claim_payment_along_route(ClaimAlongRouteArgs::new(&nodes[0], route, keysend_preimage));
1150-
assert_eq!(res, Some(PaidBolt12Invoice::StaticInvoice(static_invoice)));
1151+
assert_eq!(res, Some(Bolt12InvoiceType::StaticInvoice(static_invoice)));
11511152
}
11521153

11531154
#[cfg_attr(feature = "std", ignore)]
@@ -2391,7 +2392,7 @@ fn refresh_static_invoices_for_used_offers() {
23912392
let claimable_ev = do_pass_along_path(args).unwrap();
23922393
let keysend_preimage = extract_payment_preimage(&claimable_ev);
23932394
let res = claim_payment_along_route(ClaimAlongRouteArgs::new(sender, route, keysend_preimage));
2394-
assert_eq!(res.0, Some(PaidBolt12Invoice::StaticInvoice(updated_invoice)));
2395+
assert_eq!(res.0, Some(Bolt12InvoiceType::StaticInvoice(updated_invoice)));
23952396
}
23962397

23972398
#[cfg_attr(feature = "std", ignore)]
@@ -2726,7 +2727,7 @@ fn invoice_server_is_not_channel_peer() {
27262727
let claimable_ev = do_pass_along_path(args).unwrap();
27272728
let keysend_preimage = extract_payment_preimage(&claimable_ev);
27282729
let res = claim_payment_along_route(ClaimAlongRouteArgs::new(sender, route, keysend_preimage));
2729-
assert_eq!(res.0, Some(PaidBolt12Invoice::StaticInvoice(invoice)));
2730+
assert_eq!(res.0, Some(Bolt12InvoiceType::StaticInvoice(invoice)));
27302731
}
27312732

27322733
#[test]
@@ -2969,7 +2970,7 @@ fn async_payment_e2e() {
29692970
let keysend_preimage = extract_payment_preimage(&claimable_ev);
29702971
let (res, _) =
29712972
claim_payment_along_route(ClaimAlongRouteArgs::new(sender, route, keysend_preimage));
2972-
assert_eq!(res, Some(PaidBolt12Invoice::StaticInvoice(static_invoice)));
2973+
assert_eq!(res, Some(Bolt12InvoiceType::StaticInvoice(static_invoice)));
29732974
}
29742975

29752976
#[test]
@@ -3206,7 +3207,7 @@ fn intercepted_hold_htlc() {
32063207
let keysend_preimage = extract_payment_preimage(&claimable_ev);
32073208
let (res, _) =
32083209
claim_payment_along_route(ClaimAlongRouteArgs::new(sender, route, keysend_preimage));
3209-
assert_eq!(res, Some(PaidBolt12Invoice::StaticInvoice(static_invoice)));
3210+
assert_eq!(res, Some(Bolt12InvoiceType::StaticInvoice(static_invoice)));
32103211
}
32113212

32123213
#[test]
@@ -3456,7 +3457,7 @@ fn release_htlc_races_htlc_onion_decode() {
34563457
let keysend_preimage = extract_payment_preimage(&claimable_ev);
34573458
let (res, _) =
34583459
claim_payment_along_route(ClaimAlongRouteArgs::new(sender, route, keysend_preimage));
3459-
assert_eq!(res, Some(PaidBolt12Invoice::StaticInvoice(static_invoice)));
3460+
assert_eq!(res, Some(Bolt12InvoiceType::StaticInvoice(static_invoice)));
34603461
}
34613462

34623463
#[test]
@@ -3620,5 +3621,5 @@ fn async_payment_e2e_release_before_hold_registered() {
36203621
let keysend_preimage = extract_payment_preimage(&claimable_ev);
36213622
let (res, _) =
36223623
claim_payment_along_route(ClaimAlongRouteArgs::new(sender, route, keysend_preimage));
3623-
assert_eq!(res, Some(PaidBolt12Invoice::StaticInvoice(static_invoice)));
3624+
assert_eq!(res, Some(Bolt12InvoiceType::StaticInvoice(static_invoice)));
36243625
}

lightning/src/ln/channelmanager.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ use crate::chain::channelmonitor::{
4949
};
5050
use crate::chain::transaction::{OutPoint, TransactionData};
5151
use crate::chain::{BestBlock, ChannelMonitorUpdateStatus, Confirm, Watch};
52+
use crate::events::FundingInfo;
5253
use crate::events::{
5354
self, ClosureReason, Event, EventHandler, EventsProvider, HTLCHandlingFailureType,
5455
InboundChannelFunds, PaymentFailureReason, ReplayEvent,
5556
};
56-
use crate::events::{FundingInfo, PaidBolt12Invoice};
5757
use crate::ln::chan_utils::selected_commitment_sat_per_1000_weight;
5858
#[cfg(any(test, fuzzing, feature = "_test_utils"))]
5959
use crate::ln::channel::QuiescentAction;
@@ -102,6 +102,7 @@ use crate::offers::invoice_request::{InvoiceRequest, InvoiceRequestVerifiedFromO
102102
use crate::offers::nonce::Nonce;
103103
use crate::offers::offer::{Offer, OfferFromHrn};
104104
use crate::offers::parse::Bolt12SemanticError;
105+
use crate::offers::payer_proof::Bolt12InvoiceType;
105106
use crate::offers::refund::Refund;
106107
use crate::offers::static_invoice::StaticInvoice;
107108
use crate::onion_message::async_payments::{
@@ -821,7 +822,7 @@ mod fuzzy_channelmanager {
821822
/// The BOLT12 invoice associated with this payment, if any. This is stored here to ensure
822823
/// we can provide proof-of-payment details in payment claim events even after a restart
823824
/// with a stale ChannelManager state.
824-
bolt12_invoice: Option<PaidBolt12Invoice>,
825+
bolt12_invoice: Option<Bolt12InvoiceType>,
825826
},
826827
}
827828

@@ -957,7 +958,7 @@ impl HTLCSource {
957958
pub(crate) fn static_invoice(&self) -> Option<StaticInvoice> {
958959
match self {
959960
Self::OutboundRoute {
960-
bolt12_invoice: Some(PaidBolt12Invoice::StaticInvoice(inv)),
961+
bolt12_invoice: Some(Bolt12InvoiceType::StaticInvoice(inv)),
961962
..
962963
} => Some(inv.clone()),
963964
_ => None,
@@ -17675,7 +17676,7 @@ impl Readable for HTLCSource {
1767517676
let mut payment_id = None;
1767617677
let mut payment_params: Option<PaymentParameters> = None;
1767717678
let mut blinded_tail: Option<BlindedTail> = None;
17678-
let mut bolt12_invoice: Option<PaidBolt12Invoice> = None;
17679+
let mut bolt12_invoice: Option<Bolt12InvoiceType> = None;
1767917680
read_tlv_fields!(reader, {
1768017681
(0, session_priv, required),
1768117682
(1, payment_id, option),

lightning/src/ln/functional_test_utils.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use crate::chain::{BestBlock, ChannelMonitorUpdateStatus, Confirm, Listen, Watch
1717
use crate::events::bump_transaction::sync::BumpTransactionEventHandlerSync;
1818
use crate::events::bump_transaction::BumpTransactionEvent;
1919
use crate::events::{
20-
ClaimedHTLC, ClosureReason, Event, FundingInfo, HTLCHandlingFailureType, PaidBolt12Invoice,
21-
PathFailure, PaymentFailureReason, PaymentPurpose,
20+
ClaimedHTLC, ClosureReason, Event, FundingInfo, HTLCHandlingFailureType, PathFailure,
21+
PaymentFailureReason, PaymentPurpose,
2222
};
2323
use crate::ln::chan_utils::{
2424
commitment_tx_base_weight, COMMITMENT_TX_WEIGHT_PER_HTLC, TRUC_MAX_WEIGHT,
@@ -37,6 +37,7 @@ use crate::ln::outbound_payment::RecipientOnionFields;
3737
use crate::ln::outbound_payment::Retry;
3838
use crate::ln::peer_handler::IgnoringMessageHandler;
3939
use crate::ln::types::ChannelId;
40+
use crate::offers::payer_proof::Bolt12InvoiceType;
4041
use crate::onion_message::messenger::OnionMessenger;
4142
use crate::routing::gossip::{NetworkGraph, NetworkUpdate, P2PGossipSync};
4243
use crate::routing::router::{self, PaymentParameters, Route, RouteParameters};
@@ -2985,7 +2986,7 @@ pub fn expect_payment_sent<CM: AChannelManager, H: NodeHolder<CM = CM>>(
29852986
node: &H, expected_payment_preimage: PaymentPreimage,
29862987
expected_fee_msat_opt: Option<Option<u64>>, expect_per_path_claims: bool,
29872988
expect_post_ev_mon_update: bool,
2988-
) -> (Option<PaidBolt12Invoice>, Vec<Event>) {
2989+
) -> (Option<Bolt12InvoiceType>, Vec<Event>) {
29892990
if expect_post_ev_mon_update {
29902991
check_added_monitors(node, 0);
29912992
}
@@ -4209,7 +4210,7 @@ pub fn pass_claimed_payment_along_route_from_ev(
42094210

42104211
pub fn claim_payment_along_route(
42114212
args: ClaimAlongRouteArgs,
4212-
) -> (Option<PaidBolt12Invoice>, Vec<Event>) {
4213+
) -> (Option<Bolt12InvoiceType>, Vec<Event>) {
42134214
let ClaimAlongRouteArgs {
42144215
origin_node,
42154216
payment_preimage,
@@ -4231,7 +4232,7 @@ pub fn claim_payment_along_route(
42314232
pub fn claim_payment<'a, 'b, 'c>(
42324233
origin_node: &Node<'a, 'b, 'c>, expected_route: &[&Node<'a, 'b, 'c>],
42334234
our_payment_preimage: PaymentPreimage,
4234-
) -> Option<PaidBolt12Invoice> {
4235+
) -> Option<Bolt12InvoiceType> {
42354236
claim_payment_along_route(ClaimAlongRouteArgs::new(
42364237
origin_node,
42374238
&[expected_route],

lightning/src/ln/offers_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ use crate::blinded_path::IntroductionNode;
4949
use crate::blinded_path::message::BlindedMessagePath;
5050
use crate::blinded_path::payment::{Bolt12OfferContext, Bolt12RefundContext, DummyTlvs, PaymentContext};
5151
use crate::blinded_path::message::OffersContext;
52-
use crate::events::{ClosureReason, Event, HTLCHandlingFailureType, PaidBolt12Invoice, PaymentFailureReason, PaymentPurpose};
52+
use crate::events::{ClosureReason, Event, HTLCHandlingFailureType, PaymentFailureReason, PaymentPurpose};
5353
use crate::ln::channelmanager::{PaymentId, RecentPaymentDetails, self};
5454
use crate::ln::outbound_payment::{Bolt12PaymentError, RecipientOnionFields, Retry};
5555
use crate::types::features::Bolt12InvoiceFeatures;
@@ -253,7 +253,7 @@ fn claim_bolt12_payment_with_extra_fees<'a, 'b, 'c>(
253253
}
254254

255255
let (inv, _) = claim_payment_along_route(args);
256-
assert_eq!(inv, Some(PaidBolt12Invoice::Bolt12Invoice(invoice.clone())));
256+
assert_eq!(inv, Some(Bolt12InvoiceType::Bolt12Invoice(invoice.clone())));
257257
}
258258

259259
fn extract_offer_nonce<'a, 'b, 'c>(node: &Node<'a, 'b, 'c>, message: &OnionMessage) -> Nonce {

lightning/src/ln/outbound_payment.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use bitcoin::secp256k1::{self, Secp256k1, SecretKey};
1515
use lightning_invoice::Bolt11Invoice;
1616

1717
use crate::blinded_path::{IntroductionNode, NodeIdLookUp};
18-
use crate::events::{self, PaidBolt12Invoice, PaymentFailureReason};
18+
use crate::events::{self, PaymentFailureReason};
1919
use crate::ln::channel_state::ChannelDetails;
2020
use crate::ln::channelmanager::{
2121
EventCompletionAction, HTLCSource, OptionalBolt11PaymentParams, PaymentCompleteUpdate,
@@ -27,6 +27,7 @@ use crate::ln::onion_utils::{DecodedOnionFailure, HTLCFailReason};
2727
use crate::offers::invoice::{Bolt12Invoice, DerivedSigningPubkey, InvoiceBuilder};
2828
use crate::offers::invoice_request::InvoiceRequest;
2929
use crate::offers::nonce::Nonce;
30+
use crate::offers::payer_proof::Bolt12InvoiceType;
3031
use crate::offers::static_invoice::StaticInvoice;
3132
use crate::routing::router::{
3233
BlindedTail, InFlightHtlcs, Path, PaymentParameters, Route, RouteParameters,
@@ -126,7 +127,7 @@ pub(crate) enum PendingOutboundPayment {
126127
invoice_request: Option<InvoiceRequest>,
127128
// Storing the BOLT 12 invoice here to allow Proof of Payment after
128129
// the payment is made.
129-
bolt12_invoice: Option<PaidBolt12Invoice>,
130+
bolt12_invoice: Option<Bolt12InvoiceType>,
130131
custom_tlvs: Vec<(u64, Vec<u8>)>,
131132
pending_amt_msat: u64,
132133
/// Used to track the fee paid. Present iff the payment was serialized on 0.0.103+.
@@ -181,7 +182,7 @@ impl_writeable_tlv_based!(RetryableInvoiceRequest, {
181182
});
182183

183184
impl PendingOutboundPayment {
184-
fn bolt12_invoice(&self) -> Option<&PaidBolt12Invoice> {
185+
fn bolt12_invoice(&self) -> Option<&Bolt12InvoiceType> {
185186
match self {
186187
PendingOutboundPayment::Retryable { bolt12_invoice, .. } => bolt12_invoice.as_ref(),
187188
_ => None,
@@ -934,7 +935,7 @@ pub(super) struct SendAlongPathArgs<'a> {
934935
pub payment_id: PaymentId,
935936
pub keysend_preimage: &'a Option<PaymentPreimage>,
936937
pub invoice_request: Option<&'a InvoiceRequest>,
937-
pub bolt12_invoice: Option<&'a PaidBolt12Invoice>,
938+
pub bolt12_invoice: Option<&'a Bolt12InvoiceType>,
938939
pub session_priv_bytes: [u8; 32],
939940
pub hold_htlc_at_next_hop: bool,
940941
}
@@ -1122,7 +1123,7 @@ impl OutboundPayments {
11221123
if let Some(max_fee_msat) = params_config.max_total_routing_fee_msat {
11231124
route_params.max_total_routing_fee_msat = Some(max_fee_msat);
11241125
}
1125-
let invoice = PaidBolt12Invoice::Bolt12Invoice(invoice.clone());
1126+
let invoice = Bolt12InvoiceType::Bolt12Invoice(invoice.clone());
11261127
self.send_payment_for_bolt12_invoice_internal(
11271128
payment_id, payment_hash, None, None, invoice, route_params, retry_strategy, false, router,
11281129
first_hops, inflight_htlcs, entropy_source, node_signer, node_id_lookup, secp_ctx,
@@ -1136,7 +1137,7 @@ impl OutboundPayments {
11361137
>(
11371138
&self, payment_id: PaymentId, payment_hash: PaymentHash,
11381139
keysend_preimage: Option<PaymentPreimage>, invoice_request: Option<&InvoiceRequest>,
1139-
bolt12_invoice: PaidBolt12Invoice,
1140+
bolt12_invoice: Bolt12InvoiceType,
11401141
mut route_params: RouteParameters, retry_strategy: Retry, hold_htlcs_at_next_hop: bool, router: &R,
11411142
first_hops: Vec<ChannelDetails>, inflight_htlcs: IH, entropy_source: &ES, node_signer: &NS,
11421143
node_id_lookup: &NL, secp_ctx: &Secp256k1<secp256k1::All>, best_block_height: u32,
@@ -1395,7 +1396,7 @@ impl OutboundPayments {
13951396
retry_strategy = Retry::Attempts(0);
13961397
}
13971398

1398-
let invoice = PaidBolt12Invoice::StaticInvoice(invoice);
1399+
let invoice = Bolt12InvoiceType::StaticInvoice(invoice);
13991400
self.send_payment_for_bolt12_invoice_internal(
14001401
payment_id,
14011402
payment_hash,
@@ -1977,7 +1978,7 @@ impl OutboundPayments {
19771978
&self, payment_hash: PaymentHash, recipient_onion: RecipientOnionFields, payment_id: PaymentId,
19781979
keysend_preimage: Option<PaymentPreimage>, route: &Route, retry_strategy: Option<Retry>,
19791980
payment_params: Option<PaymentParameters>, entropy_source: &ES, best_block_height: u32,
1980-
bolt12_invoice: Option<PaidBolt12Invoice>
1981+
bolt12_invoice: Option<Bolt12InvoiceType>
19811982
) -> Result<Vec<[u8; 32]>, PaymentSendFailure> {
19821983
let mut pending_outbounds = self.pending_outbound_payments.lock().unwrap();
19831984
match pending_outbounds.entry(payment_id) {
@@ -1997,7 +1998,7 @@ impl OutboundPayments {
19971998
fn create_pending_payment<ES: EntropySource>(
19981999
payment_hash: PaymentHash, recipient_onion: RecipientOnionFields,
19992000
keysend_preimage: Option<PaymentPreimage>, invoice_request: Option<InvoiceRequest>,
2000-
bolt12_invoice: Option<PaidBolt12Invoice>, route: &Route, retry_strategy: Option<Retry>,
2001+
bolt12_invoice: Option<Bolt12InvoiceType>, route: &Route, retry_strategy: Option<Retry>,
20012002
payment_params: Option<PaymentParameters>, entropy_source: &ES, best_block_height: u32
20022003
) -> (PendingOutboundPayment, Vec<[u8; 32]>) {
20032004
let mut onion_session_privs = Vec::with_capacity(route.paths.len());
@@ -2107,7 +2108,7 @@ impl OutboundPayments {
21072108
#[rustfmt::skip]
21082109
fn pay_route_internal<NS: NodeSigner, F>(
21092110
&self, route: &Route, payment_hash: PaymentHash, recipient_onion: &RecipientOnionFields,
2110-
keysend_preimage: Option<PaymentPreimage>, invoice_request: Option<&InvoiceRequest>, bolt12_invoice: Option<&PaidBolt12Invoice>,
2111+
keysend_preimage: Option<PaymentPreimage>, invoice_request: Option<&InvoiceRequest>, bolt12_invoice: Option<&Bolt12InvoiceType>,
21112112
payment_id: PaymentId, onion_session_privs: &Vec<[u8; 32]>,
21122113
hold_htlcs_at_next_hop: bool, node_signer: &NS, best_block_height: u32, send_payment_along_path: &F
21132114
) -> Result<(), PaymentSendFailure>
@@ -2247,7 +2248,7 @@ impl OutboundPayments {
22472248

22482249
#[rustfmt::skip]
22492250
pub(super) fn claim_htlc<L: Logger>(
2250-
&self, payment_id: PaymentId, payment_preimage: PaymentPreimage, bolt12_invoice: Option<PaidBolt12Invoice>,
2251+
&self, payment_id: PaymentId, payment_preimage: PaymentPreimage, bolt12_invoice: Option<Bolt12InvoiceType>,
22512252
session_priv: SecretKey, path: Path, from_onchain: bool, ev_completion_action: &mut Option<EventCompletionAction>,
22522253
pending_events: &Mutex<VecDeque<(events::Event, Option<EventCompletionAction>)>>,
22532254
logger: &WithContext<L>,

0 commit comments

Comments
 (0)