Skip to content
Open
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
4 changes: 3 additions & 1 deletion libs/gl-plugin/src/node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,12 @@ impl Node for PluginNodeServer {

// In case the client did not specify an LSP to work with,
// let's enumerate them, and select the best option ourselves.
let lsps = self.get_lsps_offers(&mut rpc).await.map_err(|_e| {
let mut lsps = self.get_lsps_offers(&mut rpc).await.map_err(|_e| {
Status::not_found("Could not retrieve LSPS peers for invoice negotiation.")
})?;

lsps.sort_by_key(|l| l.node_id);

if lsps.len() < 1 {
return Err(Status::not_found(
"Could not find an LSP peer to negotiate the LSPS2 channel for this invoice.",
Expand Down
Loading