Skip to content

Commit d810708

Browse files
committed
Use correct nonce in InvoiceRequest context
Previously it would generate a new nonce for this context instead of using the offer nonce. This would make it so that verification would fail later when receiving a invoice request.
1 parent d1d51b3 commit d810708

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lightning/src/offers/flow.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1557,8 +1557,7 @@ where
15571557
.and_then(|builder| builder.build_and_sign(secp_ctx))
15581558
.map_err(|_| ())?;
15591559

1560-
let nonce = Nonce::from_entropy_source(&*entropy);
1561-
let context = MessageContext::Offers(OffersContext::InvoiceRequest { nonce });
1560+
let context = MessageContext::Offers(OffersContext::InvoiceRequest { nonce: offer_nonce });
15621561
let forward_invoice_request_path = self
15631562
.create_blinded_paths(peers, context)
15641563
.and_then(|paths| paths.into_iter().next().ok_or(()))?;

0 commit comments

Comments
 (0)