From 96ab759e1150d4e18d9cf311ccee0653c9a5c1b9 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 5 May 2023 00:13:25 +0000 Subject: [PATCH] Mention lnd's SCB feature in the corresponding error message It's a bit confusing when we see only "Peer sent a garbage channel_reestablish" when a peer uses lnd's SCB feature to ask us to broadcast the latest state. This updates the error message to be a bit clearer. --- lightning/src/ln/channel.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index 4fd612a4b..5ba3ab83d 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -4092,7 +4092,7 @@ impl Channel { if msg.next_local_commitment_number >= INITIAL_COMMITMENT_NUMBER || msg.next_remote_commitment_number >= INITIAL_COMMITMENT_NUMBER || msg.next_local_commitment_number == 0 { - return Err(ChannelError::Close("Peer sent a garbage channel_reestablish".to_owned())); + return Err(ChannelError::Close("Peer sent a garbage channel_reestablish (usually an lnd node with lost state asking us to force-close for them)".to_owned())); } if msg.next_remote_commitment_number > 0 { -- 2.39.5