lightningd: add "style" to listforwards.

Suggested-by: @t-bast
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `listforwards` has new entry `style`, currently "legacy" or "tlv".
This commit is contained in:
Rusty Russell
2022-03-31 13:44:27 +10:30
parent 116a77f1be
commit 2f7f7ec255
11 changed files with 132 additions and 17 deletions

View File

@@ -29,6 +29,7 @@ On success, an object containing **forwards** is returned. It is an array of ob
- **received_time** (number): the UNIX timestamp when this was received
- **out_channel** (short_channel_id, optional): the channel that the HTLC was forwarded to
- **payment_hash** (hex, optional): payment hash sought by HTLC (always 64 characters)
- **style** (string, optional): Either a legacy onion format or a modern tlv format (one of "legacy", "tlv")
If **out_channel** is present:
- **fee_msat** (msat): the amount this paid in fees
@@ -58,4 +59,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:abfaaa00817734d8acb77d02d7c024112c90605a8f93a134971a617ab4d383f9)
[comment]: # ( SHA256STAMP:131410f052b8a1845c8d3c7eb2d48df0fc7638e7d26817f56863815be86d8f1e)

View File

@@ -52,6 +52,14 @@
"description": "payment hash sought by HTLC",
"maxLength": 64,
"minLength": 64
},
"style": {
"type": "string",
"enum": [
"legacy",
"tlv"
],
"description": "Either a legacy onion format or a modern tlv format"
}
},
"allOf": [
@@ -72,6 +80,7 @@
"in_msatoshi": {},
"in_msat": {},
"status": {},
"style": {},
"received_time": {},
"resolved_time": {},
"out_channel": {},
@@ -102,6 +111,7 @@
"in_msatoshi": {},
"in_msat": {},
"status": {},
"style": {},
"received_time": {},
"resolved_time": {},
"payment_hash": {},
@@ -132,6 +142,7 @@
"in_msatoshi": {},
"in_msat": {},
"status": {},
"style": {},
"received_time": {},
"out_channel": {},
"payment_hash": {},
@@ -154,6 +165,7 @@
"in_msatoshi": {},
"in_msat": {},
"status": {},
"style": {},
"received_time": {},
"out_channel": {},
"payment_hash": {},
@@ -186,6 +198,7 @@
"in_msatoshi": {},
"in_msat": {},
"status": {},
"style": {},
"received_time": {},
"out_channel": {},
"payment_hash": {},
@@ -212,6 +225,7 @@
"in_msatoshi": {},
"in_msat": {},
"status": {},
"style": {},
"received_time": {},
"out_channel": {},
"payment_hash": {},