Skip to content

Add a further test of HTLC failure after a claim occurrs. #1058

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

Conversation

TheBlueMatt
Copy link
Collaborator

This adds a further test of 7e78fa6
which I had lying around in my TODO list for a while.

@codecov
Copy link

codecov bot commented Aug 24, 2021

Codecov Report

Merging #1058 (61bf4d2) into main (8d886ee) will increase coverage by 0.22%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1058      +/-   ##
==========================================
+ Coverage   90.36%   90.59%   +0.22%     
==========================================
  Files          69       69              
  Lines       36794    38849    +2055     
==========================================
+ Hits        33249    35195    +1946     
- Misses       3545     3654     +109     
Impacted Files Coverage Δ
lightning/src/ln/chanmon_update_fail_tests.rs 97.68% <100.00%> (+0.03%) ⬆️
lightning/src/ln/functional_tests.rs 97.58% <0.00%> (+0.21%) ⬆️
lightning/src/chain/onchaintx.rs 95.03% <0.00%> (+0.28%) ⬆️
lightning/src/chain/channelmonitor.rs 91.50% <0.00%> (+0.38%) ⬆️
lightning/src/chain/package.rs 92.89% <0.00%> (+0.61%) ⬆️
lightning/src/ln/functional_test_utils.rs 96.38% <0.00%> (+1.24%) ⬆️
lightning/src/ln/channelmanager.rs 86.65% <0.00%> (+2.97%) ⬆️
lightning-invoice/src/utils.rs 86.82% <0.00%> (+3.33%) ⬆️
lightning/src/util/events.rs 41.00% <0.00%> (+6.34%) ⬆️

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 8d886ee...61bf4d2. Read the comment docs.

Copy link
Contributor

@valentinewallace valentinewallace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test fails as expected on commits prior to 7e78fa6

@TheBlueMatt TheBlueMatt force-pushed the 2021-08-fail-claimed-dust-htlc branch from bd7d41e to 965c343 Compare November 17, 2021 19:21
@TheBlueMatt
Copy link
Collaborator Author

Trivially rebased.

@TheBlueMatt TheBlueMatt force-pushed the 2021-08-fail-claimed-dust-htlc branch from 965c343 to 50fbec6 Compare November 17, 2021 19:22
@TheBlueMatt
Copy link
Collaborator Author

Oops, test needed updating for the ChannelClosed event, did so.

@jkczyz
Copy link
Contributor

jkczyz commented Mar 22, 2022

When I rebase on main, the newly added test fails.

thread 'ln::chanmon_update_fail_tests::test_fail_htlc_on_broadcast_after_claim' panicked at 'assertion failed: events.len() > 1', lightning/src/ln/chanmon_update_fail_tests.rs:2100:5

This adds a further test of 7e78fa6
which I had lying around in my TODO list for a while.
@TheBlueMatt TheBlueMatt force-pushed the 2021-08-fail-claimed-dust-htlc branch from 61bf4d2 to 305a0d9 Compare March 24, 2022 00:55
@codecov-commenter
Copy link

Codecov Report

Merging #1058 (61bf4d2) into main (f6fa8e9) will decrease coverage by 0.21%.
The diff coverage is 100.00%.

❗ Current head 61bf4d2 differs from pull request most recent head 305a0d9. Consider uploading reports for the commit 305a0d9 to get more accurate results

@@            Coverage Diff             @@
##             main    #1058      +/-   ##
==========================================
- Coverage   90.80%   90.59%   -0.22%     
==========================================
  Files          73       69       -4     
  Lines       41209    38849    -2360     
  Branches    41209        0   -41209     
==========================================
- Hits        37420    35195    -2225     
+ Misses       3789     3654     -135     
Impacted Files Coverage Δ
lightning/src/ln/chanmon_update_fail_tests.rs 97.68% <100.00%> (-0.04%) ⬇️
lightning-invoice/src/utils.rs 86.82% <0.00%> (-9.87%) ⬇️
lightning/src/chain/chainmonitor.rs 90.87% <0.00%> (-6.77%) ⬇️
lightning/src/util/errors.rs 67.30% <0.00%> (-3.07%) ⬇️
lightning/src/ln/peer_handler.rs 49.77% <0.00%> (-2.84%) ⬇️
lightning/src/routing/scoring.rs 91.63% <0.00%> (-2.67%) ⬇️
lightning/src/util/logger.rs 83.14% <0.00%> (-2.28%) ⬇️
lightning/src/util/ser_macros.rs 86.89% <0.00%> (-2.25%) ⬇️
lightning-block-sync/src/init.rs 93.56% <0.00%> (-2.25%) ⬇️
lightning/src/util/config.rs 45.65% <0.00%> (-1.16%) ⬇️
... and 42 more

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 f6fa8e9...305a0d9. Read the comment docs.

@TheBlueMatt
Copy link
Collaborator Author

Rebased, had to very slightly tweak the end to handle the new PaymentPathSuccessful event.

@valentinewallace valentinewallace merged commit 4455143 into lightningdevkit:main Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants