ACINQ / eclair

A scala implementation of the Lightning Network.
Apache License 2.0
1.24k stars 266 forks source link

Unlock non-wallet inputs #2828

Closed t-bast closed 8 months ago

t-bast commented 8 months ago

When funding a transaction that contains inputs that are external to our bitcoin wallet, bitcoin core will add a lock to those external inputs, thinking that they may be wallet inputs that it doesn't know about yet. In our case, those are never wallet inputs, they are instead:

We previously explicitly filtered those inputs before calling unlock, which was wrong. We now also unlock those utxos.

codecov-commenter commented 8 months ago

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (86c4837) 85.97% compared to head (c59af0c) 85.95%. Report is 1 commits behind head on master.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2828 +/- ## ========================================== - Coverage 85.97% 85.95% -0.03% ========================================== Files 219 219 Lines 18429 18429 Branches 772 767 -5 ========================================== - Hits 15845 15841 -4 - Misses 2584 2588 +4 ``` | [Files](https://app.codecov.io/gh/ACINQ/eclair/pull/2828?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ) | Coverage Δ | | |---|---|---| | [...acinq/eclair/channel/fsm/DualFundingHandlers.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2828?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL2NoYW5uZWwvZnNtL0R1YWxGdW5kaW5nSGFuZGxlcnMuc2NhbGE=) | `85.71% <100.00%> (ø)` | | | [...inq/eclair/channel/fund/InteractiveTxBuilder.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2828?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL2NoYW5uZWwvZnVuZC9JbnRlcmFjdGl2ZVR4QnVpbGRlci5zY2FsYQ==) | `91.37% <50.00%> (ø)` | | | [...clair/channel/publish/ReplaceableTxPublisher.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2828?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL2NoYW5uZWwvcHVibGlzaC9SZXBsYWNlYWJsZVR4UHVibGlzaGVyLnNjYWxh) | `70.06% <80.00%> (-0.64%)` | :arrow_down: | | [...q/eclair/channel/publish/ReplaceableTxFunder.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2828?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL2NoYW5uZWwvcHVibGlzaC9SZXBsYWNlYWJsZVR4RnVuZGVyLnNjYWxh) | `85.05% <0.00%> (-0.52%)` | :arrow_down: | ... and [6 files with indirect coverage changes](https://app.codecov.io/gh/ACINQ/eclair/pull/2828/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ)