Skip to content

Commit 5b2aaec

Browse files
committed
f More logged fields
1 parent a077da6 commit 5b2aaec

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/liquidity.rs

+10-6
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,8 @@ where
519519
{
520520
log_error!(
521521
self.logger,
522-
"Requested channel size doesn't meet the LSP-provided limits (min: {}sat, max: {}sat).",
522+
"Requested channel size of {}sat doesn't meet the LSP-provided limits (min: {}sat, max: {}sat).",
523+
channel_size_sat,
523524
lsp_limits.min_channel_balance_sat,
524525
lsp_limits.max_channel_balance_sat
525526
);
@@ -531,7 +532,8 @@ where
531532
{
532533
log_error!(
533534
self.logger,
534-
"Requested LSP-side balance doesn't meet the LSP-provided limits (min: {}sat, max: {}sat).",
535+
"Requested LSP-side balance of {}sat doesn't meet the LSP-provided limits (min: {}sat, max: {}sat).",
536+
lsp_balance_sat,
535537
lsp_limits.min_initial_lsp_balance_sat,
536538
lsp_limits.max_initial_lsp_balance_sat
537539
);
@@ -543,7 +545,8 @@ where
543545
{
544546
log_error!(
545547
self.logger,
546-
"Requested client-side balance doesn't meet the LSP-provided limits (min: {}sat, max: {}sat).",
548+
"Requested client-side balance of {}sat doesn't meet the LSP-provided limits (min: {}sat, max: {}sat).",
549+
client_balance_sat,
547550
lsp_limits.min_initial_client_balance_sat,
548551
lsp_limits.max_initial_client_balance_sat
549552
);
@@ -561,15 +564,16 @@ where
561564
};
562565

563566
let (request_sender, request_receiver) = oneshot::channel();
567+
let request_id;
564568
{
565569
let mut pending_create_order_requests_lock =
566570
lsps1_service.pending_create_order_requests.lock().unwrap();
567-
let request_id = client_handler.create_order(
571+
request_id = client_handler.create_order(
568572
&lsps1_service.node_id,
569573
order_params.clone(),
570574
Some(refund_address),
571575
);
572-
pending_create_order_requests_lock.insert(request_id, request_sender);
576+
pending_create_order_requests_lock.insert(request_id.clone(), request_sender);
573577
}
574578

575579
let response = tokio::time::timeout(
@@ -578,7 +582,7 @@ where
578582
)
579583
.await
580584
.map_err(|e| {
581-
log_error!(self.logger, "Liquidity request timed out: {}", e);
585+
log_error!(self.logger, "Liquidity request with ID {:?} timed out: {}", request_id, e);
582586
Error::LiquidityRequestFailed
583587
})?
584588
.map_err(|e| {

0 commit comments

Comments
 (0)