-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use channel_reestablish tlv when sending channel_ready #3025
Conversation
When the remote node supports the 'your_last_funding_locked' tlv we do not need to always resend channel_ready when there are no channel updates. The tlv removes the ambiguity about whether our last channel_ready was received.
I refactored the reestablish logic a bit so that sending I added two tests for the legacy (pre-splice) behavior and updated any other tests that expected the old behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only nits
eclair-core/src/main/scala/fr/acinq/eclair/channel/fsm/Channel.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/channel/fsm/Channel.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/channel/states/ChannelStateTestsHelperMethods.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/channel/states/ChannelStateTestsHelperMethods.scala
Outdated
Show resolved
Hide resolved
...-core/src/test/scala/fr/acinq/eclair/channel/states/c/WaitForDualFundingReadyStateSpec.scala
Outdated
Show resolved
Hide resolved
...-core/src/test/scala/fr/acinq/eclair/channel/states/c/WaitForDualFundingReadyStateSpec.scala
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/channel/states/e/OfflineStateSpec.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/channel/states/e/OfflineStateSpec.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/channel/states/e/OfflineStateSpec.scala
Outdated
Show resolved
Hide resolved
For consistency, "re-sending" log messages should use the spec name, not the internal type.
Thanks for the feedback! I think it should all good now. |
eclair-core/src/test/scala/fr/acinq/eclair/channel/states/e/OfflineStateSpec.scala
Outdated
Show resolved
Hide resolved
The `nodeParams` used when creating `alice` and `bob` during `init` did not use the init features set by `computeFeatures`.
When the remote node supports the
your_last_funding_locked
tlv we do not need to always resendchannel_ready
when there are no channel updates. The tlv removes the ambiguity about whether our lastchannel_ready
was received.