Skip to content

Commit

Permalink
listpeers: show maximum_htlc_out_msat.
Browse files Browse the repository at this point in the history
This is htlc_maximum_msat in BOLT 7 speak, but this name matches our existing
fields and is clearer in this context.

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Mar 22, 2022
1 parent f078a91 commit 33bd251
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/lightning-listpeers.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ On success, an object containing **peers** is returned. It is an array of objec
- **spendable_msat** (msat, optional): total we could send through channel
- **receivable_msat** (msat, optional): total peer could send through channel
- **minimum_htlc_in_msat** (msat, optional): the minimum amount HTLC we accept
- **maximum_htlc_out_msat** (msat, optional): the maximum amount HTLC we will send
- **their_to_self_delay** (u32, optional): the number of blocks before they can take their funds if they unilateral close
- **our_to_self_delay** (u32, optional): the number of blocks before we can take our funds if we unilateral close
- **max_accepted_htlcs** (u32, optional): Maximum number of incoming HTLC we will accept at once
Expand Down Expand Up @@ -378,4 +379,4 @@ Main web site: <https://github.com/ElementsProject/lightning> Lightning
RFC site (BOLT \#9):
<https://github.com/lightningnetwork/lightning-rfc/blob/master/09-features.md>

[comment]: # ( SHA256STAMP:001e3cf495571bb09fe29f74adde8a6e40e69ddb1169934924eaf901a1e5f3c0)
[comment]: # ( SHA256STAMP:8e30caf48aed46acc7c053a355867dc8b8624035dba4ea7668d30d86b8d827cd)
8 changes: 8 additions & 0 deletions doc/schemas/listpeers.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,10 @@
"type": "msat",
"description": "the minimum amount HTLC we accept"
},
"maximum_htlc_out_msat": {
"type": "msat",
"description": "the maximum amount HTLC we will send"
},
"their_to_self_delay": {
"type": "u32",
"description": "the number of blocks before they can take their funds if they unilateral close"
Expand Down Expand Up @@ -772,6 +776,7 @@
"spendable_msat": {},
"receivable_msat": {},
"minimum_htlc_in_msat": {},
"maximum_htlc_out_msat": {},
"spendable_msatoshi": {},
"receivable_msatoshi": {},
"their_to_self_delay": {},
Expand Down Expand Up @@ -859,6 +864,7 @@
"spendable_msat": {},
"receivable_msat": {},
"minimum_htlc_in_msat": {},
"maximum_htlc_out_msat": {},
"spendable_msatoshi": {},
"receivable_msatoshi": {},
"their_to_self_delay": {},
Expand Down Expand Up @@ -947,6 +953,7 @@
"spendable_msat": {},
"receivable_msat": {},
"minimum_htlc_in_msat": {},
"maximum_htlc_out_msat": {},
"spendable_msatoshi": {},
"receivable_msatoshi": {},
"their_to_self_delay": {},
Expand Down Expand Up @@ -1034,6 +1041,7 @@
"spendable_msat": {},
"receivable_msat": {},
"minimum_htlc_in_msat": {},
"maximum_htlc_out_msat": {},
"spendable_msatoshi": {},
"receivable_msatoshi": {},
"their_to_self_delay": {},
Expand Down
3 changes: 3 additions & 0 deletions lightningd/peer_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,9 @@ static void json_add_channel(struct lightningd *ld,
channel->our_config.htlc_minimum,
"htlc_minimum_msat",
"minimum_htlc_in_msat");
json_add_amount_msat_only(response,
"maximum_htlc_out_msat",
channel->htlc_maximum_msat);

/* The `to_self_delay` is imposed on the *other*
* side, so our configuration `to_self_delay` is
Expand Down

0 comments on commit 33bd251

Please sign in to comment.