Skip to content

Commit 34b2be7

Browse files
committed
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.
1 parent 8fc2ace commit 34b2be7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lightning/src/ln/channelmanager.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -9118,7 +9118,11 @@ where
91189118
)?;
91199119
let builder: InvoiceBuilder<DerivedSigningPubkey> = builder.into();
91209120
let invoice = builder.allow_mpp().build_and_sign(secp_ctx)?;
9121-
let reply_paths = self.create_blinded_paths(OffersContext::Unknown {})
9121+
9122+
let context = OffersContext::InboundPayment {
9123+
payment_hash: invoice.payment_hash(),
9124+
};
9125+
let reply_paths = self.create_blinded_paths(context)
91229126
.map_err(|_| Bolt12SemanticError::MissingPaths)?;
91239127

91249128
let mut pending_offers_messages = self.pending_offers_messages.lock().unwrap();

0 commit comments

Comments
 (0)