diff --git a/doc/lightning-listpeers.7.md b/doc/lightning-listpeers.7.md index b90d112e7..569f53e58 100644 --- a/doc/lightning-listpeers.7.md +++ b/doc/lightning-listpeers.7.md @@ -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 @@ -378,4 +379,4 @@ Main web site: Lightning RFC site (BOLT \#9): -[comment]: # ( SHA256STAMP:001e3cf495571bb09fe29f74adde8a6e40e69ddb1169934924eaf901a1e5f3c0) +[comment]: # ( SHA256STAMP:8e30caf48aed46acc7c053a355867dc8b8624035dba4ea7668d30d86b8d827cd) diff --git a/doc/schemas/listpeers.schema.json b/doc/schemas/listpeers.schema.json index e25ef39ac..cada820f1 100644 --- a/doc/schemas/listpeers.schema.json +++ b/doc/schemas/listpeers.schema.json @@ -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" @@ -772,6 +776,7 @@ "spendable_msat": {}, "receivable_msat": {}, "minimum_htlc_in_msat": {}, + "maximum_htlc_out_msat": {}, "spendable_msatoshi": {}, "receivable_msatoshi": {}, "their_to_self_delay": {}, @@ -859,6 +864,7 @@ "spendable_msat": {}, "receivable_msat": {}, "minimum_htlc_in_msat": {}, + "maximum_htlc_out_msat": {}, "spendable_msatoshi": {}, "receivable_msatoshi": {}, "their_to_self_delay": {}, @@ -947,6 +953,7 @@ "spendable_msat": {}, "receivable_msat": {}, "minimum_htlc_in_msat": {}, + "maximum_htlc_out_msat": {}, "spendable_msatoshi": {}, "receivable_msatoshi": {}, "their_to_self_delay": {}, @@ -1034,6 +1041,7 @@ "spendable_msat": {}, "receivable_msat": {}, "minimum_htlc_in_msat": {}, + "maximum_htlc_out_msat": {}, "spendable_msatoshi": {}, "receivable_msatoshi": {}, "their_to_self_delay": {}, diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index aae61a8c2..e3aff6408 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -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