From 03541a48456942376288b7d9ecad3d6d89120ca0 Mon Sep 17 00:00:00 2001 From: shaavan Date: Sun, 8 Sep 2024 14:49:46 +0530 Subject: [PATCH] f: Always use new nonce for sent Invoice --- lightning/src/ln/channelmanager.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index 3306004a1b..bd43ae385e 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -10894,7 +10894,7 @@ where match response { Ok(invoice) => { - let nonce = nonce.unwrap_or_else(|| Nonce::from_entropy_source(&*self.entropy_source)); + let nonce = Nonce::from_entropy_source(&*self.entropy_source); let hmac = signer::hmac_for_payment_hash(payment_hash, nonce, expanded_key); let context = MessageContext::Offers(OffersContext::InboundPayment { payment_hash, nonce, hmac }); Some((OffersMessage::Invoice(invoice), responder.respond_with_reply_path(context)))