Skip to content

Commit e5eec2a

Browse files
authored
Increase maximum number of accepted HTLCs to 19 (#817)
#800 included a lot of improvements on our data structure and removed data that was either redondant or could be re-computed. This means that serialised channel states are smaller, and we can increase the number of pending HTLCs to 18 and stay below the 65 Kb size limit for LN messages. Note that this applies to new channels only: existing ones will still use the previous value of 12 pending HTLCs.
1 parent 40e91fe commit e5eec2a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

modules/core/src/commonMain/kotlin/fr/acinq/lightning/NodeParams.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ data class NodeParams(
223223
feerateTolerance = FeerateTolerance(ratioLow = 0.01, ratioHigh = 100.0)
224224
),
225225
maxHtlcValueInFlightMsat = 20_000_000_000L,
226-
maxAcceptedHtlcs = 12,
226+
maxAcceptedHtlcs = 19,
227227
expiryDeltaBlocks = CltvExpiryDelta(144),
228228
// We use a long expiry delta here for a few reasons:
229229
// - we want to ensure we're able to get HTLC-success txs confirmed if our peer ignores our preimage

modules/core/src/commonTest/kotlin/fr/acinq/lightning/serialization/channel/StateSerializationTestsCommon.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ class StateSerializationTestsCommon : LightningTestSuite() {
9191
.maxOf { it.size }
9292
}
9393

94-
// with 12 incoming payments and 12 outgoing payments, our encrypted backup stays below the 65k limit for peer storage
95-
assertTrue(peerStorageSize(12, 12) <= 65_000)
94+
// with 19 incoming payments and 18 outgoing payments, our encrypted backup stays below the 65k limit for peer storage
95+
assertTrue(peerStorageSize(19, 19) <= 65_000)
9696
}
9797

9898
@Test

0 commit comments

Comments
 (0)