Skip to content

Commit 20bcf4f

Browse files
Stop logging on Error / Info level on possible peer garbage
1 parent bb48bbc commit 20bcf4f

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

lightning-liquidity/src/lsps2/client.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ where
206206
"Received get_info response for an unknown request: {:?}",
207207
request_id
208208
),
209-
action: ErrorAction::IgnoreAndLog(Level::Info),
209+
action: ErrorAction::IgnoreAndLog(Level::Debug),
210210
});
211211
}
212212

@@ -222,7 +222,7 @@ where
222222
"Received get_info response from unknown peer: {:?}",
223223
counterparty_node_id
224224
),
225-
action: ErrorAction::IgnoreAndLog(Level::Info),
225+
action: ErrorAction::IgnoreAndLog(Level::Debug),
226226
})
227227
},
228228
}
@@ -246,7 +246,7 @@ where
246246
"Received get_info error for an unknown request: {:?}",
247247
request_id
248248
),
249-
action: ErrorAction::IgnoreAndLog(Level::Info),
249+
action: ErrorAction::IgnoreAndLog(Level::Debug),
250250
});
251251
}
252252

@@ -267,7 +267,7 @@ where
267267
Err(lightning_error)
268268
},
269269
None => {
270-
return Err(LightningError { err: format!("Received error response for a get_info request from an unknown counterparty ({:?})",counterparty_node_id), action: ErrorAction::IgnoreAndLog(Level::Info)});
270+
return Err(LightningError { err: format!("Received error response for a get_info request from an unknown counterparty ({:?})",counterparty_node_id), action: ErrorAction::IgnoreAndLog(Level::Debug)});
271271
},
272272
}
273273
}
@@ -289,7 +289,7 @@ where
289289
"Received buy response for an unknown request: {:?}",
290290
request_id
291291
),
292-
action: ErrorAction::IgnoreAndLog(Level::Info),
292+
action: ErrorAction::IgnoreAndLog(Level::Debug),
293293
})?;
294294

295295
if let Ok(intercept_scid) = result.jit_channel_scid.to_scid() {
@@ -316,7 +316,7 @@ where
316316
"Received buy response from unknown peer: {:?}",
317317
counterparty_node_id
318318
),
319-
action: ErrorAction::IgnoreAndLog(Level::Info),
319+
action: ErrorAction::IgnoreAndLog(Level::Debug),
320320
});
321321
},
322322
}
@@ -335,7 +335,7 @@ where
335335

336336
peer_state.pending_buy_requests.remove(&request_id).ok_or(LightningError {
337337
err: format!("Received buy error for an unknown request: {:?}", request_id),
338-
action: ErrorAction::IgnoreAndLog(Level::Info),
338+
action: ErrorAction::IgnoreAndLog(Level::Debug),
339339
})?;
340340

341341
let lightning_error = LightningError {
@@ -355,7 +355,7 @@ where
355355
Err(lightning_error)
356356
},
357357
None => {
358-
return Err(LightningError { err: format!("Received error response for a buy request from an unknown counterparty ({:?})", counterparty_node_id), action: ErrorAction::IgnoreAndLog(Level::Info)});
358+
return Err(LightningError { err: format!("Received error response for a buy request from an unknown counterparty ({:?})", counterparty_node_id), action: ErrorAction::IgnoreAndLog(Level::Debug)});
359359
},
360360
}
361361
}

lightning-liquidity/src/lsps5/client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,14 +316,14 @@ where
316316
"Received unexpected request message from {}",
317317
counterparty_node_id
318318
),
319-
action: ErrorAction::IgnoreAndLog(Level::Info),
319+
action: ErrorAction::IgnoreAndLog(Level::Debug),
320320
});
321321
},
322322
LSPS5Message::Response(rid, resp) => (rid, resp),
323323
};
324324
let mut result: Result<(), LightningError> = Err(LightningError {
325325
err: format!("Received LSPS5 response from unknown peer: {}", counterparty_node_id),
326-
action: ErrorAction::IgnoreAndLog(Level::Error),
326+
action: ErrorAction::IgnoreAndLog(Level::Debug),
327327
});
328328
let event_queue_notifier = self.pending_events.notifier();
329329
let handle_response = |peer_state: &mut PeerState<TP>| {
@@ -409,7 +409,7 @@ where
409409
} else {
410410
result = Err(LightningError {
411411
err: format!("Received response for unknown request ID: {}", request_id.0),
412-
action: ErrorAction::IgnoreAndLog(Level::Info),
412+
action: ErrorAction::IgnoreAndLog(Level::Debug),
413413
});
414414
}
415415
};

lightning-liquidity/src/manager.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ where
500500
lsps0_service_handler.handle_message(msg, sender_node_id)?;
501501
},
502502
None => {
503-
return Err(LightningError { err: format!("Received LSPS0 request message without LSPS0 service handler configured. From node = {:?}", sender_node_id), action: ErrorAction::IgnoreAndLog(Level::Info)});
503+
return Err(LightningError { err: format!("Received LSPS0 request message without LSPS0 service handler configured. From node = {:?}", sender_node_id), action: ErrorAction::IgnoreAndLog(Level::Debug)});
504504
},
505505
}
506506
},
@@ -510,7 +510,7 @@ where
510510
lsps1_client_handler.handle_message(msg, sender_node_id)?;
511511
},
512512
None => {
513-
return Err(LightningError { err: format!("Received LSPS1 response message without LSPS1 client handler configured. From node = {:?}", sender_node_id), action: ErrorAction::IgnoreAndLog(Level::Info)});
513+
return Err(LightningError { err: format!("Received LSPS1 response message without LSPS1 client handler configured. From node = {:?}", sender_node_id), action: ErrorAction::IgnoreAndLog(Level::Debug)});
514514
},
515515
}
516516
},
@@ -521,19 +521,19 @@ where
521521
lsps1_service_handler.handle_message(_msg, sender_node_id)?;
522522
},
523523
None => {
524-
return Err(LightningError { err: format!("Received LSPS1 request message without LSPS1 service handler configured. From node = {:?}", sender_node_id), action: ErrorAction::IgnoreAndLog(Level::Info)});
524+
return Err(LightningError { err: format!("Received LSPS1 request message without LSPS1 service handler configured. From node = {:?}", sender_node_id), action: ErrorAction::IgnoreAndLog(Level::Debug)});
525525
},
526526
}
527527
#[cfg(not(lsps1_service))]
528-
return Err(LightningError { err: format!("Received LSPS1 request message without LSPS1 service handler configured. From node = {:?}", sender_node_id), action: ErrorAction::IgnoreAndLog(Level::Info)});
528+
return Err(LightningError { err: format!("Received LSPS1 request message without LSPS1 service handler configured. From node = {:?}", sender_node_id), action: ErrorAction::IgnoreAndLog(Level::Debug)});
529529
},
530530
LSPSMessage::LSPS2(msg @ LSPS2Message::Response(..)) => {
531531
match &self.lsps2_client_handler {
532532
Some(lsps2_client_handler) => {
533533
lsps2_client_handler.handle_message(msg, sender_node_id)?;
534534
},
535535
None => {
536-
return Err(LightningError { err: format!("Received LSPS2 response message without LSPS2 client handler configured. From node = {:?}", sender_node_id), action: ErrorAction::IgnoreAndLog(Level::Info)});
536+
return Err(LightningError { err: format!("Received LSPS2 response message without LSPS2 client handler configured. From node = {:?}", sender_node_id), action: ErrorAction::IgnoreAndLog(Level::Debug)});
537537
},
538538
}
539539
},
@@ -543,7 +543,7 @@ where
543543
lsps2_service_handler.handle_message(msg, sender_node_id)?;
544544
},
545545
None => {
546-
return Err(LightningError { err: format!("Received LSPS2 request message without LSPS2 service handler configured. From node = {:?}", sender_node_id), action: ErrorAction::IgnoreAndLog(Level::Info)});
546+
return Err(LightningError { err: format!("Received LSPS2 request message without LSPS2 service handler configured. From node = {:?}", sender_node_id), action: ErrorAction::IgnoreAndLog(Level::Debug)});
547547
},
548548
}
549549
},
@@ -553,7 +553,7 @@ where
553553
lsps5_client_handler.handle_message(msg, sender_node_id)?;
554554
},
555555
None => {
556-
return Err(LightningError { err: format!("Received LSPS5 response message without LSPS5 client handler configured. From node = {:?}", sender_node_id), action: ErrorAction::IgnoreAndLog(Level::Info)});
556+
return Err(LightningError { err: format!("Received LSPS5 response message without LSPS5 client handler configured. From node = {:?}", sender_node_id), action: ErrorAction::IgnoreAndLog(Level::Debug)});
557557
},
558558
}
559559
},
@@ -563,7 +563,7 @@ where
563563
lsps5_service_handler.handle_message(msg, sender_node_id)?;
564564
},
565565
None => {
566-
return Err(LightningError { err: format!("Received LSPS5 request message without LSPS5 service handler configured. From node = {:?}", sender_node_id), action: ErrorAction::IgnoreAndLog(Level::Info)});
566+
return Err(LightningError { err: format!("Received LSPS5 request message without LSPS5 service handler configured. From node = {:?}", sender_node_id), action: ErrorAction::IgnoreAndLog(Level::Debug)});
567567
},
568568
}
569569
},

0 commit comments

Comments
 (0)