From: Jeffrey Czyz Date: Tue, 23 Jul 2024 18:49:37 +0000 (-0500) Subject: Include payment hash in Bolt12Invoice reply path X-Git-Tag: v0.0.124-beta~30^2~1 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=d2c22d58cee0c0d0fcfe657f82cb4bb647d56288;p=rust-lightning 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. --- 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();