lnwallet: fix HTLC trimming test case to use dust_limit for zero-fee HTLCs
What changed, and why it matters
This commit only adjusts the numbers used inside a single test case so that the test actually exercises the intended behavior. It does not change any production code, protocol rules, or wallet logic. There is no security issue here.
No action needed; this is a benign test-only correction.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change modifies test parameters in lnwallet/taproot_test_vectors_test.go for the ‘commitment tx with some HTLCs trimmed’ case. With taproot’s zero-fee second-level HTLCs, trimming depends only on whether the HTLC amount is below the dust limit. The old parameters (fee_per_kw=100000, dust_limit=546) left all test HTLCs above the dust limit, so no trimming occurred. The new parameters (fee_per_kw=644, dust_limit=2500) cause the 1000, 2000, and 2000 sat HTLCs to be trimmed while keeping the 3000 and 4000 sat HTLCs. This is purely a test-fix with no runtime effect.
Changed components
lnwallet/taproot_test_vectors_test.goInspect captured patch +2 / −2
diff --git a/lnwallet/taproot_test_vectors_test.go b/lnwallet/taproot_test_vectors_test.go
index 84a91ce..791c36f 100644
--- a/lnwallet/taproot_test_vectors_test.go
+++ b/lnwallet/taproot_test_vectors_test.go
@@ -894,8 +894,8 @@ var taprootTransactionTestCases = []struct {
name: "commitment tx with some HTLCs trimmed",
localBalance: 6_988_000_000,
remoteBalance: 3_000_000_000,
- feePerKw: 100_000,
- dustLimit: 546,
+ feePerKw: 644,
+ dustLimit: 2500,
useTestHtlcs: true,
},
}
Why this scored 15/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.