-
Notifications
You must be signed in to change notification settings - Fork 265
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
Fail unsigned outgoing htlcs on force-close #1832
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1832 +/- ##
==========================================
+ Coverage 87.27% 87.33% +0.05%
==========================================
Files 159 159
Lines 11943 11950 +7
Branches 471 448 -23
==========================================
+ Hits 10423 10436 +13
+ Misses 1520 1514 -6
|
eclair-core/src/test/scala/fr/acinq/eclair/channel/states/e/NormalStateSpec.scala
Outdated
Show resolved
Hide resolved
Looks like this only works on user-issued force-close command currently? I'd guess that would be the least likely occurrence, more probable case is something like we are sending HTLCs and suddenly see remote commit published. |
I agree the fix should handle all cases of channel closing. |
I think the right way to fix this is here:
We should wait for the commit tx to be confirmed and then fail all these proposed HTLCs, either by modifying |
I disagree, because in the case of an overridden htlc, that htlc was previously committed, which is why we need to make sure that a competing commitment won the race. Here, since the htlc has not been signed, it will be overridden as soon as we enter the closing procedure. |
eclair-core/src/main/scala/fr/acinq/eclair/channel/Channel.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/channel/Channel.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/PaymentLifecycle.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/channel/states/e/NormalStateSpec.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/channel/states/e/NormalStateSpec.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/channel/states/e/NormalStateSpec.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/channel/states/e/NormalStateSpec.scala
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/payment/relay/ChannelRelayerSpec.scala
Outdated
Show resolved
Hide resolved
Co-authored-by: Bastien Teinturier <[email protected]>
Rebased on master. |
See #1829.
We should fail outgoing unsigned htlcs on force close, just like we do when disconnected.