Update pre-HTLC DataLossProtect to match new spec changes#537
Merged
TheBlueMatt merged 1 commit intolightningdevkit:masterfrom Mar 17, 2020
Merged
Conversation
This was the way DataLossProtect was originally written, however it didn't match other implementations at the time during testing. It turns out, other implementations didn't agree with each other anyway (depending on the exact timeline), so the spec was clarified somewhat in lightning/bolts#550 . This updates us to be in line with the new guidance and appears to solve out-of-sync issues in testing.
Codecov Report
@@ Coverage Diff @@
## master #537 +/- ##
=======================================
Coverage 89.75% 89.76%
=======================================
Files 34 34
Lines 18991 18991
=======================================
+ Hits 17046 17047 +1
+ Misses 1945 1944 -1
Continue to review full report at Codecov.
|
Contributor
|
I've def manually tested this line of code extensively, if you wanna get this off your plate and I'll PR my test + potential other fix separately. |
Collaborator
Author
|
Alright, thanks! Looking forward to your tests :). |
valentinewallace
added a commit
to valentinewallace/rust-lightning
that referenced
this pull request
Mar 17, 2020
valentinewallace
added a commit
to valentinewallace/rust-lightning
that referenced
this pull request
Mar 17, 2020
valentinewallace
added a commit
to valentinewallace/rust-lightning
that referenced
this pull request
Mar 18, 2020
valentinewallace
added a commit
to valentinewallace/rust-lightning
that referenced
this pull request
Mar 18, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was the way DataLossProtect was originally written, however it
didn't match other implementations at the time during testing. It
turns out, other implementations didn't agree with each other
anyway (depending on the exact timeline), so the spec was clarified
somewhat in lightning/bolts#550
. This updates us to be in line with the new guidance and appears
to solve out-of-sync issues in testing.
If someone feels super motivated to go write a test for this, they should. I'll circle back around to it sooner or later if not, but it should probably get a test given both the old and new versions happily pass our existing tests.