From d2c22d58cee0c0d0fcfe657f82cb4bb647d56288 Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Tue, 23 Jul 2024 13:49:37 -0500 Subject: [PATCH] Include payment hash in Bolt12Invoice reply path Instead of using OffersContext::Unknown for the Bolt12Invoice reply path use OffersContext::InboundPayment to include the payment hash. OffersContext::Unknown will be removed in another commit. --- lightning/src/ln/channelmanager.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index b57dee302..c316dc2b4 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -9117,7 +9117,11 @@ where )?; let builder: InvoiceBuilder = builder.into(); let invoice = builder.allow_mpp().build_and_sign(secp_ctx)?; - let reply_paths = self.create_blinded_paths(OffersContext::Unknown {}) + + let context = OffersContext::InboundPayment { + payment_hash: invoice.payment_hash(), + }; + let reply_paths = self.create_blinded_paths(context) .map_err(|_| Bolt12SemanticError::MissingPaths)?; let mut pending_offers_messages = self.pending_offers_messages.lock().unwrap(); -- 2.39.5