From 397fa4b9aae98a43ce3538402dae6eb1377af388 Mon Sep 17 00:00:00 2001 From: Ian Slane Date: Sun, 21 Jul 2024 13:05:53 -0600 Subject: [PATCH] Update `create_offer_builder` to use `Bolt12CreationError` Updated the create_offer_builder method in ChannelManager to replace Bolt12SemanticError with Bolt12CreationError. --- lightning/src/ln/channelmanager.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index 89401b4643c..b99f7b14be7 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -8672,7 +8672,7 @@ macro_rules! create_offer_builder { ($self: ident, $builder: ty) => { /// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest pub fn create_offer_builder( &$self, absolute_expiry: Option - ) -> Result<$builder, Bolt12SemanticError> { + ) -> Result<$builder, Bolt12CreationError> { let node_id = $self.get_our_node_id(); let expanded_key = &$self.inbound_payment_key; let entropy = &*$self.entropy_source; @@ -8680,7 +8680,7 @@ macro_rules! create_offer_builder { ($self: ident, $builder: ty) => { let path = $self.create_blinded_paths_using_absolute_expiry(OffersContext::Unknown {}, absolute_expiry) .and_then(|paths| paths.into_iter().next().ok_or(())) - .map_err(|_| Bolt12SemanticError::MissingPaths)?; + .map_err(|_| Bolt12CreationError::InvalidSemantics(Bolt12SemanticError::MissingPaths))?; let builder = OfferBuilder::deriving_signing_pubkey( node_id, expanded_key, entropy, secp_ctx