Skip to content

Add test coverage for ClosureReason::DisconnectedPeer #1471

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

ViktorTigerstrom
Copy link
Contributor

@ViktorTigerstrom ViktorTigerstrom commented May 8, 2022

Closes #1431.

Add test that ensures that channels are closed with
ClosureReason::DisconnectedPeer if the peer disconnects before the
funding transaction has been broadcasted.

Let me know if the test should be extended with the scenario that nodes[0] can still close the channel with ClosureReason::DisconnectedPeer if nodes[1] disconnects, even after the FundingSigned msg has sent by nodes[1] as long as nodes[0]::handle_funding_signed hasn't been executed.

@codecov-commenter
Copy link

Codecov Report

Merging #1471 (a74df15) into main (6592081) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1471   +/-   ##
=======================================
  Coverage   90.92%   90.92%           
=======================================
  Files          75       75           
  Lines       41842    41863   +21     
  Branches    41842    41863   +21     
=======================================
+ Hits        38043    38064   +21     
  Misses       3799     3799           
Impacted Files Coverage Δ
lightning/src/ln/functional_tests.rs 97.08% <100.00%> (-0.09%) ⬇️
lightning/src/ln/channelmanager.rs 84.76% <0.00%> (+0.08%) ⬆️
lightning/src/ln/channel.rs 88.57% <0.00%> (+0.08%) ⬆️

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 6592081...a74df15. Read the comment docs.

TheBlueMatt
TheBlueMatt previously approved these changes May 9, 2022
vincenzopalazzo
vincenzopalazzo previously approved these changes May 9, 2022
Copy link
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

LGTM

tnull
tnull previously approved these changes May 9, 2022
Add test that ensures that channels are closed with
`ClosureReason::DisconnectedPeer` if the peer disconnects before the
funding transaction has been broadcasted.
@ViktorTigerstrom ViktorTigerstrom force-pushed the 2022-05-test-disconnected-before-funding-broadcasted branch from a74df15 to 7f0aa93 Compare May 9, 2022 13:05
@ViktorTigerstrom
Copy link
Contributor Author

ViktorTigerstrom commented May 9, 2022

Noticed that I had managed to add an extra blank line before the test, and fixed a small grammar error. Sorry about that!

@TheBlueMatt TheBlueMatt merged commit b4fdb87 into lightningdevkit:main May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add test coverage for ClosureReason::DisconnectedPeer
6 participants