Skip to content

Commit d3c8b63

Browse files
committed
f rename
1 parent b60ba66 commit d3c8b63

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

lightning/src/blinded_path/message.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ pub enum OffersContext {
424424
/// [`Refund`]: crate::offers::refund::Refund
425425
/// [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
426426
/// [`InvoiceError`]: crate::offers::invoice_error::InvoiceError
427-
OutboundPaymentInRefund {
427+
OutboundPaymentForRefund {
428428
/// Payment ID used when creating a [`Refund`].
429429
///
430430
/// [`Refund`]: crate::offers::refund::Refund
@@ -445,7 +445,7 @@ pub enum OffersContext {
445445
/// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
446446
/// [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
447447
/// [`InvoiceError`]: crate::offers::invoice_error::InvoiceError
448-
OutboundPaymentInInvReq {
448+
OutboundPaymentForOffer {
449449
/// Payment ID used when creating an [`InvoiceRequest`].
450450
///
451451
/// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
@@ -636,7 +636,7 @@ impl_writeable_tlv_based_enum!(OffersContext,
636636
(0, InvoiceRequest) => {
637637
(0, nonce, required),
638638
},
639-
(1, OutboundPaymentInRefund) => {
639+
(1, OutboundPaymentForRefund) => {
640640
(0, payment_id, required),
641641
(1, nonce, required),
642642
},
@@ -648,7 +648,7 @@ impl_writeable_tlv_based_enum!(OffersContext,
648648
(2, invoice_slot, required),
649649
(4, path_absolute_expiry, required),
650650
},
651-
(4, OutboundPaymentInInvReq) => {
651+
(4, OutboundPaymentForOffer) => {
652652
(0, payment_id, required),
653653
(1, nonce, required),
654654
},

lightning/src/ln/channelmanager.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15349,7 +15349,7 @@ where
1534915349
},
1535015350
OffersMessage::StaticInvoice(invoice) => {
1535115351
let payment_id = match context {
15352-
Some(OffersContext::OutboundPaymentInInvReq { payment_id, .. }) => payment_id,
15352+
Some(OffersContext::OutboundPaymentForOffer { payment_id, .. }) => payment_id,
1535315353
_ => return None
1535415354
};
1535515355
let res = self.initiate_async_payment(&invoice, payment_id);
@@ -15365,8 +15365,8 @@ where
1536515365
log_trace!(logger, "Received invoice_error: {}", invoice_error);
1536615366

1536715367
match context {
15368-
Some(OffersContext::OutboundPaymentInInvReq { payment_id, .. })
15369-
|Some(OffersContext::OutboundPaymentInRefund { payment_id, .. }) => {
15368+
Some(OffersContext::OutboundPaymentForOffer { payment_id, .. })
15369+
|Some(OffersContext::OutboundPaymentForRefund { payment_id, .. }) => {
1537015370
self.abandon_payment_with_reason(
1537115371
payment_id, PaymentFailureReason::InvoiceRequestRejected,
1537215372
);

lightning/src/offers/flow.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,8 @@ where
498498
/// Verifies a [`Bolt12Invoice`] using the provided [`OffersContext`] or the invoice's payer
499499
/// metadata, returning the corresponding [`PaymentId`] if successful.
500500
///
501-
/// - If an [`OffersContext::OutboundPaymentInInvReq`] or
502-
/// [`OffersContext::OutboundPaymentInRefund`] with a `nonce` is provided, verification is
501+
/// - If an [`OffersContext::OutboundPaymentForOffer`] or
502+
/// [`OffersContext::OutboundPaymentForRefund`] with a `nonce` is provided, verification is
503503
/// performed using this to form the payer metadata.
504504
/// - If no context is provided and the invoice corresponds to a [`Refund`] without blinded paths,
505505
/// verification is performed using the [`Bolt12Invoice::payer_metadata`].
@@ -514,14 +514,14 @@ where
514514
None if invoice.is_for_refund_without_paths() => {
515515
invoice.verify_using_metadata(expanded_key, secp_ctx)
516516
},
517-
Some(&OffersContext::OutboundPaymentInInvReq { payment_id, nonce, .. }) => {
517+
Some(&OffersContext::OutboundPaymentForOffer { payment_id, nonce, .. }) => {
518518
if invoice.is_for_offer() {
519519
invoice.verify_using_payer_data(payment_id, nonce, expanded_key, secp_ctx)
520520
} else {
521521
Err(())
522522
}
523523
},
524-
Some(&OffersContext::OutboundPaymentInRefund { payment_id, nonce, .. }) => {
524+
Some(&OffersContext::OutboundPaymentForRefund { payment_id, nonce, .. }) => {
525525
if invoice.is_for_refund() {
526526
invoice.verify_using_payer_data(payment_id, nonce, expanded_key, secp_ctx)
527527
} else {
@@ -693,7 +693,7 @@ where
693693

694694
let nonce = Nonce::from_entropy_source(entropy);
695695
let context =
696-
MessageContext::Offers(OffersContext::OutboundPaymentInRefund { payment_id, nonce });
696+
MessageContext::Offers(OffersContext::OutboundPaymentForRefund { payment_id, nonce });
697697

698698
// Create the base builder with common properties
699699
let mut builder = RefundBuilder::deriving_signing_pubkey(
@@ -1130,7 +1130,7 @@ where
11301130
peers: Vec<MessageForwardNode>,
11311131
) -> Result<(), Bolt12SemanticError> {
11321132
let context =
1133-
MessageContext::Offers(OffersContext::OutboundPaymentInInvReq { payment_id, nonce });
1133+
MessageContext::Offers(OffersContext::OutboundPaymentForOffer { payment_id, nonce });
11341134
let reply_paths = self
11351135
.create_blinded_paths(peers, context)
11361136
.map_err(|_| Bolt12SemanticError::MissingPaths)?;

0 commit comments

Comments
 (0)