Skip to content

Only return previously confirmed Txids from CM's get_relevant_txids() #1998

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

tnull
Copy link
Contributor

@tnull tnull commented Jan 31, 2023

As of now the Confirm::get_relevant_txids() docs state that it won't return any transactions for which we hadn't previously seen a confirmation. To align its functionality a bit more with the docs, at least for ChannelManager, we only return values for which we had registered a confirmation block hash before.

While now ChannelManager will only return previously confirmed transactions, we can't ensure the same for ChainMonitor, as we need to maintain backwards compatibility with version prior to 0.0.113, at which we started tracking the block hash in ChannelMonitors. We therefore add a note to the docs stating that users need to track confirmations on their own for channels created prior to 0.0.113.

As of now the `Confirm::get_relevant_txids()` docs state that it won't
return any transactions for which we hadn't previously seen a
confirmation. To align its functionality a bit more with the docs, at
least for `ChannelManager`, we only return values for which we had
registered a confirmation block hash before.
@tnull tnull force-pushed the 2023-01-no-none-in-channel-relevant-txids branch from 0b1955c to aea96cc Compare January 31, 2023 23:31
While now `ChannelManager` will only return previously confirmed
transactions, we can't ensure the same for `ChainMonitor`, as we need to
maintain backwards compatibility with version prior to 0.0.113, at which
we started tracking the block hash in `ChannelMonitor`s. We therefore
add a note to the docs stating that users need to track confirmations on
their own for channels created prior to 0.0.113.
@tnull tnull force-pushed the 2023-01-no-none-in-channel-relevant-txids branch from aea96cc to 909bae5 Compare January 31, 2023 23:56
@codecov-commenter
Copy link

Codecov Report

Base: 90.90% // Head: 90.89% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (909bae5) compared to base (c59150a).
Patch coverage: 100.00% of modified lines in pull request are covered.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1998      +/-   ##
==========================================
- Coverage   90.90%   90.89%   -0.01%     
==========================================
  Files          99       99              
  Lines       52570    52570              
  Branches    52570    52570              
==========================================
- Hits        47787    47786       -1     
- Misses       4783     4784       +1     
Impacted Files Coverage Δ
lightning/src/chain/mod.rs 81.81% <ø> (ø)
lightning/src/ln/channelmanager.rs 87.25% <100.00%> (-0.03%) ⬇️
lightning/src/chain/onchaintx.rs 94.72% <0.00%> (-1.02%) ⬇️
lightning/src/ln/functional_tests.rs 97.10% <0.00%> (+0.04%) ⬆️
lightning/src/chain/channelmonitor.rs 91.12% <0.00%> (+0.09%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@TheBlueMatt TheBlueMatt merged commit bc90d00 into lightningdevkit:main Feb 1, 2023
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.

4 participants