multi: fix lint and itest failures for production taproot channels
What changed, and why it matters
This commit is a routine cleanup patch. It adds linter-suppression comments to silence line-length warnings and updates an integration test to cover both variants of a new taproot channel type. There is no change to production behavior or security logic.
No security action required; treat as normal maintenance/test fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff only touches two files: (1) contractcourt/utxonursery.go adds //nolint:ll directives to two long case labels for final taproot witness types, and (2) itest/lnd_funding_test.go broadens a test condition so that the negotiation-failure assertion handles both SIMPLE_TAPROOT and SIMPLE_TAPROOT_FINAL symmetrically. No cryptographic, consensus, or network code is modified.
Changed components
contractcourt/utxonursery.goitest/lnd_funding_test.goInspect captured patch +14 / −9
diff --git a/contractcourt/utxonursery.go b/contractcourt/utxonursery.go
index 2f534ec..02e8323 100644
--- a/contractcourt/utxonursery.go
+++ b/contractcourt/utxonursery.go
@@ -699,9 +699,9 @@ func (u *UtxoNursery) NurseryReport(
fallthrough
case input.TaprootHtlcOfferedTimeoutSecondLevel:
fallthrough
- case input.TaprootHtlcAcceptedSuccessSecondLevelFinal:
+ case input.TaprootHtlcAcceptedSuccessSecondLevelFinal: //nolint:ll
fallthrough
- case input.TaprootHtlcOfferedTimeoutSecondLevelFinal:
+ case input.TaprootHtlcOfferedTimeoutSecondLevelFinal: //nolint:ll
fallthrough
case input.HtlcAcceptedSuccessSecondLevel:
fallthrough
diff --git a/itest/lnd_funding_test.go b/itest/lnd_funding_test.go
index bf36d7a..d23c886 100644
--- a/itest/lnd_funding_test.go
+++ b/itest/lnd_funding_test.go
@@ -198,13 +198,18 @@ func runBasicFundingTest(ht *lntest.HarnessTest, carolCommitType,
privateChan = true
}
- // If carol wants taproot, but dave wants something else (excluding
- // SIMPLE_TAPROOT_FINAL which is allowed via cross-type negotiation),
- // then we'll assert that the channel negotiation attempt fails.
- if carolCommitType == lnrpc.CommitmentType_SIMPLE_TAPROOT &&
- daveCommitType != lnrpc.CommitmentType_SIMPLE_TAPROOT &&
- daveCommitType != lnrpc.CommitmentType_SIMPLE_TAPROOT_FINAL {
-
+ // If carol wants taproot (staging or final), but dave wants something
+ // that doesn't enable taproot support, then we'll assert that the
+ // channel negotiation attempt fails. Cross-type negotiation between
+ // SIMPLE_TAPROOT and SIMPLE_TAPROOT_FINAL succeeds because both
+ // staging and final feature bits are advertised when taproot is
+ // enabled.
+ carolWantsTaproot := carolCommitType == lnrpc.CommitmentType_SIMPLE_TAPROOT || //nolint:ll
+ carolCommitType == lnrpc.CommitmentType_SIMPLE_TAPROOT_FINAL
+ daveHasTaproot := daveCommitType == lnrpc.CommitmentType_SIMPLE_TAPROOT || //nolint:ll
+ daveCommitType == lnrpc.CommitmentType_SIMPLE_TAPROOT_FINAL
+
+ if carolWantsTaproot && !daveHasTaproot {
expectedErr := fmt.Errorf("requested channel type " +
"not supported")
amt := funding.MaxBtcFundingAmount
Why this scored 14/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.