Skip to content

Commit fe4d503

Browse files
Lagrang3endothermicdev
authored andcommitted
add max_htlc_value_in_flight_msat to listpeerchan
Changelog-Added: JSON-RPC: `listpeerchannels` new output fields `their_max_total_htlc_out_msat` and `our_max_total_htlc_out_msat` as the value of `max_htlc_value_in_flight` (as of BOLT02) set by the local and remote nodes on channel creation. Changelog-Deprecated: JSON-RPC: `listpeerchannels` value `max_total_htlc_in_msat`: use `our_max_total_htlc_out_msat` instead to follow spec naming convention.
1 parent 0df3c58 commit fe4d503

File tree

10 files changed

+889
-770
lines changed

10 files changed

+889
-770
lines changed

.msggen.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2669,6 +2669,7 @@
26692669
"ListPeerChannels.channels[].next_fee_step": 15,
26702670
"ListPeerChannels.channels[].next_feerate": 14,
26712671
"ListPeerChannels.channels[].opener": 19,
2672+
"ListPeerChannels.channels[].our_max_htlc_value_in_flight_msat": 62,
26722673
"ListPeerChannels.channels[].our_reserve_msat": 32,
26732674
"ListPeerChannels.channels[].our_to_self_delay": 39,
26742675
"ListPeerChannels.channels[].out_fulfilled_msat": 51,
@@ -2687,6 +2688,7 @@
26872688
"ListPeerChannels.channels[].state": 3,
26882689
"ListPeerChannels.channels[].state_changes[]": 42,
26892690
"ListPeerChannels.channels[].status[]": 43,
2691+
"ListPeerChannels.channels[].their_max_htlc_value_in_flight_msat": 61,
26902692
"ListPeerChannels.channels[].their_reserve_msat": 31,
26912693
"ListPeerChannels.channels[].their_to_self_delay": 38,
26922694
"ListPeerChannels.channels[].to_us_msat": 23,
@@ -10106,7 +10108,7 @@
1010610108
},
1010710109
"ListPeerChannels.channels[].max_total_htlc_in_msat": {
1010810110
"added": "v23.02",
10109-
"deprecated": null
10111+
"deprecated": "v25.02"
1011010112
},
1011110113
"ListPeerChannels.channels[].maximum_htlc_out_msat": {
1011210114
"added": "v23.02",
@@ -10136,6 +10138,10 @@
1013610138
"added": "v23.02",
1013710139
"deprecated": null
1013810140
},
10141+
"ListPeerChannels.channels[].our_max_htlc_value_in_flight_msat": {
10142+
"added": "v25.02",
10143+
"deprecated": null
10144+
},
1013910145
"ListPeerChannels.channels[].our_reserve_msat": {
1014010146
"added": "v23.02",
1014110147
"deprecated": null
@@ -10228,6 +10234,10 @@
1022810234
"added": "v23.02",
1022910235
"deprecated": null
1023010236
},
10237+
"ListPeerChannels.channels[].their_max_htlc_value_in_flight_msat": {
10238+
"added": "v25.02",
10239+
"deprecated": null
10240+
},
1023110241
"ListPeerChannels.channels[].their_reserve_msat": {
1023210242
"added": "v23.02",
1023310243
"deprecated": null

cln-grpc/proto/node.proto

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cln-grpc/src/convert.rs

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cln-rpc/src/model.rs

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contrib/msggen/msggen/schema.json

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24438,7 +24438,25 @@
2443824438
"max_total_htlc_in_msat": {
2443924439
"type": "msat",
2444024440
"description": [
24441-
"Max amount accept in a single payment."
24441+
"Max amount accept in a single payment. This field is deprecated, use instead our_max_htlc_value_in_flight_msat"
24442+
],
24443+
"deprecated": [
24444+
"v25.02",
24445+
"v26.05"
24446+
]
24447+
},
24448+
"their_max_htlc_value_in_flight_msat": {
24449+
"type": "msat",
24450+
"added": "v25.02",
24451+
"description": [
24452+
"Cap on total value of outstanding HTLCs offered to the remote node. This limits the total amount in flight we can send through this channel."
24453+
]
24454+
},
24455+
"our_max_htlc_value_in_flight_msat": {
24456+
"type": "msat",
24457+
"added": "v25.02",
24458+
"description": [
24459+
"Cap on total value of outstanding HTLCs we accept from the remote node. This limits the total amount in flight we can receive through this channel."
2444224460
]
2444324461
},
2444424462
"their_reserve_msat": {
@@ -24911,6 +24929,8 @@
2491124929
"fee_proportional_millionths": {},
2491224930
"dust_limit_msat": {},
2491324931
"max_total_htlc_in_msat": {},
24932+
"our_max_total_htlc_in_msat": {},
24933+
"their_max_total_htlc_in_msat": {},
2491424934
"their_reserve_msat": {},
2491524935
"our_reserve_msat": {},
2491624936
"spendable_msat": {},
@@ -24929,6 +24949,8 @@
2492924949
"msatoshi_total": {},
2493024950
"dust_limit_satoshis": {},
2493124951
"max_htlc_value_in_flight_msat": {},
24952+
"our_max_htlc_value_in_flight_msat": {},
24953+
"their_max_htlc_value_in_flight_msat": {},
2493224954
"our_channel_reserve_satoshis": {},
2493324955
"their_channel_reserve_satoshis": {},
2493424956
"spendable_satoshis": {},
@@ -25008,6 +25030,8 @@
2500825030
"fee_proportional_millionths": {},
2500925031
"dust_limit_msat": {},
2501025032
"max_total_htlc_in_msat": {},
25033+
"our_max_total_htlc_in_msat": {},
25034+
"their_max_total_htlc_in_msat": {},
2501125035
"their_reserve_msat": {},
2501225036
"our_reserve_msat": {},
2501325037
"spendable_msat": {},
@@ -25026,6 +25050,8 @@
2502625050
"msatoshi_total": {},
2502725051
"dust_limit_satoshis": {},
2502825052
"max_htlc_value_in_flight_msat": {},
25053+
"our_max_htlc_value_in_flight_msat": {},
25054+
"their_max_htlc_value_in_flight_msat": {},
2502925055
"our_channel_reserve_satoshis": {},
2503025056
"their_channel_reserve_satoshis": {},
2503125057
"spendable_satoshis": {},
@@ -25104,6 +25130,8 @@
2510425130
"fee_proportional_millionths": {},
2510525131
"dust_limit_msat": {},
2510625132
"max_total_htlc_in_msat": {},
25133+
"our_max_total_htlc_in_msat": {},
25134+
"their_max_total_htlc_in_msat": {},
2510725135
"their_reserve_msat": {},
2510825136
"our_reserve_msat": {},
2510925137
"spendable_msat": {},
@@ -25122,6 +25150,8 @@
2512225150
"msatoshi_total": {},
2512325151
"dust_limit_satoshis": {},
2512425152
"max_htlc_value_in_flight_msat": {},
25153+
"our_max_htlc_value_in_flight_msat": {},
25154+
"their_max_htlc_value_in_flight_msat": {},
2512525155
"our_channel_reserve_satoshis": {},
2512625156
"their_channel_reserve_satoshis": {},
2512725157
"spendable_satoshis": {},
@@ -25202,6 +25232,8 @@
2520225232
"fee_proportional_millionths": {},
2520325233
"dust_limit_msat": {},
2520425234
"max_total_htlc_in_msat": {},
25235+
"our_max_total_htlc_in_msat": {},
25236+
"their_max_total_htlc_in_msat": {},
2520525237
"their_reserve_msat": {},
2520625238
"our_reserve_msat": {},
2520725239
"spendable_msat": {},
@@ -25220,6 +25252,8 @@
2522025252
"msatoshi_total": {},
2522125253
"dust_limit_satoshis": {},
2522225254
"max_htlc_value_in_flight_msat": {},
25255+
"our_max_htlc_value_in_flight_msat": {},
25256+
"their_max_htlc_value_in_flight_msat": {},
2522325257
"our_channel_reserve_satoshis": {},
2522425258
"their_channel_reserve_satoshis": {},
2522525259
"spendable_satoshis": {},
@@ -25386,6 +25420,8 @@
2538625420
"fee_proportional_millionths": 10,
2538725421
"dust_limit_msat": 546000,
2538825422
"max_total_htlc_in_msat": 18446744073709552000,
25423+
"their_max_htlc_value_in_flight_msat": 18446744073709552000,
25424+
"our_max_htlc_value_in_flight_msat": 18446744073709552000,
2538925425
"their_reserve_msat": 10000000,
2539025426
"our_reserve_msat": 10000000,
2539125427
"spendable_msat": 363951707,
@@ -25516,6 +25552,8 @@
2551625552
"fee_proportional_millionths": 10,
2551725553
"dust_limit_msat": 546000,
2551825554
"max_total_htlc_in_msat": 18446744073709552000,
25555+
"their_max_htlc_value_in_flight_msat": 18446744073709552000,
25556+
"our_max_htlc_value_in_flight_msat": 18446744073709552000,
2551925557
"their_reserve_msat": 10000000,
2552025558
"our_reserve_msat": 10000000,
2552125559
"spendable_msat": 363951707,
@@ -25640,6 +25678,8 @@
2564025678
"fee_proportional_millionths": 10,
2564125679
"dust_limit_msat": 546000,
2564225680
"max_total_htlc_in_msat": 18446744073709552000,
25681+
"their_max_htlc_value_in_flight_msat": 18446744073709552000,
25682+
"our_max_htlc_value_in_flight_msat": 18446744073709552000,
2564325683
"their_reserve_msat": 546000,
2564425684
"our_reserve_msat": 546000,
2564525685
"spendable_msat": 8172000,

contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py

Lines changed: 764 additions & 764 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contrib/pyln-testing/pyln/testing/grpc2py.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,6 +1018,7 @@ def listpeerchannels_channels2py(m):
10181018
"minimum_htlc_out_msat": amount2msat(m.minimum_htlc_out_msat), # PrimitiveField in generate_composite
10191019
"next_fee_step": m.next_fee_step, # PrimitiveField in generate_composite
10201020
"next_feerate": m.next_feerate, # PrimitiveField in generate_composite
1021+
"our_max_htlc_value_in_flight_msat": amount2msat(m.our_max_htlc_value_in_flight_msat), # PrimitiveField in generate_composite
10211022
"our_reserve_msat": amount2msat(m.our_reserve_msat), # PrimitiveField in generate_composite
10221023
"our_to_self_delay": m.our_to_self_delay, # PrimitiveField in generate_composite
10231024
"out_fulfilled_msat": amount2msat(m.out_fulfilled_msat), # PrimitiveField in generate_composite
@@ -1033,6 +1034,7 @@ def listpeerchannels_channels2py(m):
10331034
"scratch_txid": hexlify(m.scratch_txid), # PrimitiveField in generate_composite
10341035
"short_channel_id": m.short_channel_id, # PrimitiveField in generate_composite
10351036
"spendable_msat": amount2msat(m.spendable_msat), # PrimitiveField in generate_composite
1037+
"their_max_htlc_value_in_flight_msat": amount2msat(m.their_max_htlc_value_in_flight_msat), # PrimitiveField in generate_composite
10361038
"their_reserve_msat": amount2msat(m.their_reserve_msat), # PrimitiveField in generate_composite
10371039
"their_to_self_delay": m.their_to_self_delay, # PrimitiveField in generate_composite
10381040
"to_us_msat": amount2msat(m.to_us_msat), # PrimitiveField in generate_composite

doc/schemas/lightning-listpeerchannels.json

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,25 @@
543543
"max_total_htlc_in_msat": {
544544
"type": "msat",
545545
"description": [
546-
"Max amount accept in a single payment."
546+
"Max amount accept in a single payment. This field is deprecated, use instead our_max_htlc_value_in_flight_msat"
547+
],
548+
"deprecated": [
549+
"v25.02",
550+
"v26.05"
551+
]
552+
},
553+
"their_max_htlc_value_in_flight_msat": {
554+
"type": "msat",
555+
"added": "v25.02",
556+
"description": [
557+
"Cap on total value of outstanding HTLCs offered to the remote node. This limits the total amount in flight we can send through this channel."
558+
]
559+
},
560+
"our_max_htlc_value_in_flight_msat": {
561+
"type": "msat",
562+
"added": "v25.02",
563+
"description": [
564+
"Cap on total value of outstanding HTLCs we accept from the remote node. This limits the total amount in flight we can receive through this channel."
547565
]
548566
},
549567
"their_reserve_msat": {
@@ -1016,6 +1034,8 @@
10161034
"fee_proportional_millionths": {},
10171035
"dust_limit_msat": {},
10181036
"max_total_htlc_in_msat": {},
1037+
"our_max_total_htlc_in_msat": {},
1038+
"their_max_total_htlc_in_msat": {},
10191039
"their_reserve_msat": {},
10201040
"our_reserve_msat": {},
10211041
"spendable_msat": {},
@@ -1034,6 +1054,8 @@
10341054
"msatoshi_total": {},
10351055
"dust_limit_satoshis": {},
10361056
"max_htlc_value_in_flight_msat": {},
1057+
"our_max_htlc_value_in_flight_msat": {},
1058+
"their_max_htlc_value_in_flight_msat": {},
10371059
"our_channel_reserve_satoshis": {},
10381060
"their_channel_reserve_satoshis": {},
10391061
"spendable_satoshis": {},
@@ -1113,6 +1135,8 @@
11131135
"fee_proportional_millionths": {},
11141136
"dust_limit_msat": {},
11151137
"max_total_htlc_in_msat": {},
1138+
"our_max_total_htlc_in_msat": {},
1139+
"their_max_total_htlc_in_msat": {},
11161140
"their_reserve_msat": {},
11171141
"our_reserve_msat": {},
11181142
"spendable_msat": {},
@@ -1131,6 +1155,8 @@
11311155
"msatoshi_total": {},
11321156
"dust_limit_satoshis": {},
11331157
"max_htlc_value_in_flight_msat": {},
1158+
"our_max_htlc_value_in_flight_msat": {},
1159+
"their_max_htlc_value_in_flight_msat": {},
11341160
"our_channel_reserve_satoshis": {},
11351161
"their_channel_reserve_satoshis": {},
11361162
"spendable_satoshis": {},
@@ -1209,6 +1235,8 @@
12091235
"fee_proportional_millionths": {},
12101236
"dust_limit_msat": {},
12111237
"max_total_htlc_in_msat": {},
1238+
"our_max_total_htlc_in_msat": {},
1239+
"their_max_total_htlc_in_msat": {},
12121240
"their_reserve_msat": {},
12131241
"our_reserve_msat": {},
12141242
"spendable_msat": {},
@@ -1227,6 +1255,8 @@
12271255
"msatoshi_total": {},
12281256
"dust_limit_satoshis": {},
12291257
"max_htlc_value_in_flight_msat": {},
1258+
"our_max_htlc_value_in_flight_msat": {},
1259+
"their_max_htlc_value_in_flight_msat": {},
12301260
"our_channel_reserve_satoshis": {},
12311261
"their_channel_reserve_satoshis": {},
12321262
"spendable_satoshis": {},
@@ -1307,6 +1337,8 @@
13071337
"fee_proportional_millionths": {},
13081338
"dust_limit_msat": {},
13091339
"max_total_htlc_in_msat": {},
1340+
"our_max_total_htlc_in_msat": {},
1341+
"their_max_total_htlc_in_msat": {},
13101342
"their_reserve_msat": {},
13111343
"our_reserve_msat": {},
13121344
"spendable_msat": {},
@@ -1325,6 +1357,8 @@
13251357
"msatoshi_total": {},
13261358
"dust_limit_satoshis": {},
13271359
"max_htlc_value_in_flight_msat": {},
1360+
"our_max_htlc_value_in_flight_msat": {},
1361+
"their_max_htlc_value_in_flight_msat": {},
13281362
"our_channel_reserve_satoshis": {},
13291363
"their_channel_reserve_satoshis": {},
13301364
"spendable_satoshis": {},
@@ -1491,6 +1525,8 @@
14911525
"fee_proportional_millionths": 10,
14921526
"dust_limit_msat": 546000,
14931527
"max_total_htlc_in_msat": 18446744073709552000,
1528+
"their_max_htlc_value_in_flight_msat": 18446744073709552000,
1529+
"our_max_htlc_value_in_flight_msat": 18446744073709552000,
14941530
"their_reserve_msat": 10000000,
14951531
"our_reserve_msat": 10000000,
14961532
"spendable_msat": 363951707,
@@ -1621,6 +1657,8 @@
16211657
"fee_proportional_millionths": 10,
16221658
"dust_limit_msat": 546000,
16231659
"max_total_htlc_in_msat": 18446744073709552000,
1660+
"their_max_htlc_value_in_flight_msat": 18446744073709552000,
1661+
"our_max_htlc_value_in_flight_msat": 18446744073709552000,
16241662
"their_reserve_msat": 10000000,
16251663
"our_reserve_msat": 10000000,
16261664
"spendable_msat": 363951707,
@@ -1745,6 +1783,8 @@
17451783
"fee_proportional_millionths": 10,
17461784
"dust_limit_msat": 546000,
17471785
"max_total_htlc_in_msat": 18446744073709552000,
1786+
"their_max_htlc_value_in_flight_msat": 18446744073709552000,
1787+
"our_max_htlc_value_in_flight_msat": 18446744073709552000,
17481788
"their_reserve_msat": 546000,
17491789
"our_reserve_msat": 546000,
17501790
"spendable_msat": 8172000,

0 commit comments

Comments
 (0)