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

Generate a funding_locked on relevant transactions_confirmed calls #1363

Conversation

TheBlueMatt
Copy link
Collaborator

Previously, if we were offline when a funding transaction was
locked in, and then we came back online, calling
best_block_updated once followed by transactions_confirmed,
we'd not generate a funding_locked until the next
best_block_updated.

We address this by re-calling best_block_updated in
transactions_confirmed, similar to how ChannelMonitor works.

Reported by BlueWallet.

@codecov-commenter
Copy link

codecov-commenter commented Mar 13, 2022

Codecov Report

Merging #1363 (abfc3ec) into main (ca163c3) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head abfc3ec differs from pull request most recent head ea76942. Consider uploading reports for the commit ea76942 to get more accurate results

@@           Coverage Diff           @@
##             main    #1363   +/-   ##
=======================================
  Coverage   90.65%   90.66%           
=======================================
  Files          73       73           
  Lines       40462    40482   +20     
=======================================
+ Hits        36682    36701   +19     
- Misses       3780     3781    +1     
Impacted Files Coverage Δ
lightning/src/ln/channelmanager.rs 84.79% <100.00%> (+0.01%) ⬆️
lightning/src/ln/functional_tests.rs 97.14% <100.00%> (-0.01%) ⬇️

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 ca163c3...ea76942. Read the comment docs.

Copy link
Contributor

@jkczyz jkczyz left a comment

Choose a reason for hiding this comment

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

Looks good modulo one nit.

@TheBlueMatt TheBlueMatt force-pushed the 2022-03-tx-conf-ordering-lock-delay branch from 4e89d79 to 5d82303 Compare March 14, 2022 20:17
jkczyz
jkczyz previously approved these changes Mar 14, 2022
@TheBlueMatt TheBlueMatt force-pushed the 2022-03-tx-conf-ordering-lock-delay branch from 5d82303 to abfc3ec Compare March 14, 2022 20:23
jkczyz
jkczyz previously approved these changes Mar 14, 2022
Previously, if we were offline when a funding transaction was
locked in, and then we came back online, calling
`best_block_updated` once followed by `transactions_confirmed`,
we'd not generate a funding_locked until the next
`best_block_updated`.

We address this by re-calling `best_block_updated` in
`transactions_confirmed`, similar to how `ChannelMonitor` works.
@TheBlueMatt TheBlueMatt force-pushed the 2022-03-tx-conf-ordering-lock-delay branch from abfc3ec to ea76942 Compare March 15, 2022 23:59
@TheBlueMatt
Copy link
Collaborator Author

Squashed without changes.

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

Successfully merging this pull request may close these issues.

4 participants