Skip to content

Commit

Permalink
Move recommended_feerates message to CONNECTED state (#2984)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
t-bast authored Jan 22, 2025
1 parent 1c38591 commit 29ac25f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions eclair-core/src/main/scala/fr/acinq/eclair/io/Peer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 29ac25f

Please sign in to comment.