Skip to content

Commit 6b96866

Browse files
committed
f - check if the Offer supports the chain
1 parent 9f980fc commit 6b96866

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7171,6 +7171,10 @@ where
71717171
let entropy = &*self.entropy_source;
71727172
let secp_ctx = &self.secp_ctx;
71737173

7174+
if !offer.supports_chain(self.chain_hash) {
7175+
return Err(Bolt12SemanticError::UnsupportedChain);
7176+
}
7177+
71747178
let builder = offer.request_invoice_deriving_payer_id(
71757179
expanded_key, entropy, secp_ctx, payment_id
71767180
)?;

0 commit comments

Comments
 (0)