From d17012b630c43b9debcfc1e02b9645d327554c77 Mon Sep 17 00:00:00 2001 From: t-bast Date: Tue, 21 Jan 2025 17:31:40 +0100 Subject: [PATCH] Move `recommended_feerates` message to `CONNECTED` state We previously handled `recommended_feerates` in our `whenUnhandled` handler, but that doesn't work since we have a catch-all handler in the `CONNECTED` state for all known lightning messages. We thus move this handler into the `CONNECTED` state to avoid warnings in the logs. --- eclair-core/src/main/scala/fr/acinq/eclair/io/Peer.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eclair-core/src/main/scala/fr/acinq/eclair/io/Peer.scala b/eclair-core/src/main/scala/fr/acinq/eclair/io/Peer.scala index ddb8f5d5d1..66b1e6759c 100644 --- a/eclair-core/src/main/scala/fr/acinq/eclair/io/Peer.scala +++ b/eclair-core/src/main/scala/fr/acinq/eclair/io/Peer.scala @@ -543,6 +543,10 @@ class Peer(val nodeParams: NodeParams, replyTo_opt.foreach(_ ! MessageRelay.Sent(messageId)) stay() + case Event(msg: RecommendedFeerates, _) => + log.info("our peer recommends the following feerates: funding={}, commitment={}", msg.fundingFeerate, msg.commitmentFeerate) + stay() + case Event(unknownMsg: UnknownMessage, d: ConnectedData) if nodeParams.pluginMessageTags.contains(unknownMsg.tag) => context.system.eventStream.publish(UnknownMessageReceived(self, remoteNodeId, unknownMsg, d.connectionInfo)) stay() @@ -623,10 +627,6 @@ class Peer(val nodeParams: NodeParams, stay() } - case Event(msg: RecommendedFeerates, _) => - log.info("our peer recommends the following feerates: funding={}, commitment={}", msg.fundingFeerate, msg.commitmentFeerate) - stay() - case Event(current: CurrentBlockHeight, d) => // If we have pending will_add_htlc that are timing out, it doesn't make any sense to keep them, even if we have // already funded the corresponding channel: our peer will force-close if we relay them.