Skip to content

LSPS5 - small follow ups #3963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lightning-liquidity/src/lsps5/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub const DEFAULT_RESPONSE_MAX_AGE_SECS: u64 = 3600;
#[derive(Debug, Clone)]
/// Configuration for the LSPS5 client
pub struct LSPS5ClientConfig {
/// Maximum age in seconds for cached responses (default: 3600 - 1 hour).
/// Maximum age in seconds for cached responses (default: [`DEFAULT_RESPONSE_MAX_AGE_SECS`]).
pub response_max_age_secs: Duration,
}

Expand Down
10 changes: 5 additions & 5 deletions lightning-liquidity/src/lsps5/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ where
/// [`WebhookNotificationMethod::LSPS5PaymentIncoming`]: super::msgs::WebhookNotificationMethod::LSPS5PaymentIncoming
pub fn notify_payment_incoming(&self, client_id: PublicKey) -> Result<(), LSPS5ProtocolError> {
let notification = WebhookNotification::payment_incoming();
self.broadcast_notification(client_id, notification)
self.send_notifications_to_client_webhooks(client_id, notification)
}

/// Notify that an HTLC or other time-bound contract is expiring soon.
Expand All @@ -359,7 +359,7 @@ where
&self, client_id: PublicKey, timeout: u32,
) -> Result<(), LSPS5ProtocolError> {
let notification = WebhookNotification::expiry_soon(timeout);
self.broadcast_notification(client_id, notification)
self.send_notifications_to_client_webhooks(client_id, notification)
}

/// Notify that the LSP intends to manage liquidity (e.g. close or splice) on client channels.
Expand All @@ -376,7 +376,7 @@ where
&self, client_id: PublicKey,
) -> Result<(), LSPS5ProtocolError> {
let notification = WebhookNotification::liquidity_management_request();
self.broadcast_notification(client_id, notification)
self.send_notifications_to_client_webhooks(client_id, notification)
}

/// Notify that the client has one or more pending BOLT Onion Messages.
Expand All @@ -393,10 +393,10 @@ where
&self, client_id: PublicKey,
) -> Result<(), LSPS5ProtocolError> {
let notification = WebhookNotification::onion_message_incoming();
self.broadcast_notification(client_id, notification)
self.send_notifications_to_client_webhooks(client_id, notification)
}

fn broadcast_notification(
fn send_notifications_to_client_webhooks(
&self, client_id: PublicKey, notification: WebhookNotification,
) -> Result<(), LSPS5ProtocolError> {
let mut webhooks = self.webhooks.lock().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion lightning-liquidity/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ where
channel_manager.clone(),
node_signer,
config.clone(),
time_provider.clone(),
time_provider,
)
})
});
Expand Down
Loading