Skip to content
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

Update pre-HTLC DataLossProtect to match new spec changes #537

Merged

Conversation

TheBlueMatt
Copy link
Collaborator

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.

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.
@TheBlueMatt TheBlueMatt added the MOAR TEST PLZ NEEDS MOAR TEST label Mar 6, 2020
@codecov
Copy link

codecov bot commented Mar 6, 2020

Codecov Report

Merging #537 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #537   +/-   ##
=======================================
  Coverage   89.75%   89.76%           
=======================================
  Files          34       34           
  Lines       18991    18991           
=======================================
+ Hits        17046    17047    +1     
+ Misses       1945     1944    -1     
Impacted Files Coverage Δ
lightning/src/ln/functional_tests.rs 96.31% <0.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d850e12...4f06d7a. Read the comment docs.

@TheBlueMatt TheBlueMatt added this to the 0.0.11 milestone Mar 6, 2020
@valentinewallace valentinewallace self-requested a review March 11, 2020 01:08
@valentinewallace valentinewallace self-assigned this Mar 11, 2020
@valentinewallace
Copy link
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.

@TheBlueMatt
Copy link
Collaborator Author

TheBlueMatt commented Mar 17, 2020

Alright, thanks! Looking forward to your tests :).

@TheBlueMatt TheBlueMatt merged commit 33b7c90 into lightningdevkit:master 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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MOAR TEST PLZ NEEDS MOAR TEST
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants