Skip to content

Commit fef1649

Browse files
committed
doc: improve documentation of listpays
1. It's called listpays not listpay. 2. "index" does NOT have a default value (it must be specified if limit or start are used) 3. Note that limit and start have effects on accuracy, since we combine records. Signed-off-by: Rusty Russell <[email protected]>
1 parent fd7fa86 commit fef1649

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

cln-rpc/src/model.rs

Lines changed: 1 addition & 1 deletion
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: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22971,7 +22971,7 @@
2297122971
"rpc": "listpays",
2297222972
"title": "Command for querying payment status",
2297322973
"description": [
22974-
"The **listpay** RPC command gets the status of all *pay* commands, or a single one if either *bolt11* or *payment_hash* was specified."
22974+
"The **listpays** RPC command gets the status of all *pay* commands (by combining results from listsendpays which lists every payment part), or a single one if either *bolt11* or *payment_hash* was specified."
2297522975
],
2297622976
"categories": [
2297722977
"readonly"
@@ -23011,22 +23011,24 @@
2301123011
"updated"
2301223012
],
2301323013
"description": [
23014-
"If neither *in_channel* nor *out_channel* is specified, it controls ordering."
23015-
],
23016-
"default": "`created`"
23014+
"If neither *in_channel* nor *out_channel* is specified, it controls ordering, by `created` or `updated`."
23015+
]
2301723016
},
2301823017
"start": {
2301923018
"type": "u64",
2302023019
"added": "v24.11",
2302123020
"description": [
23022-
"If `index` is specified, `start` may be specified to start from that value, which is generally returned from lightning-wait(7)."
23021+
"If `index` is specified, `start` may be specified to start from that value, which is generally returned from lightning-wait(7).",
23022+
"NOTE: if this is used, `amount_sent_msat` and `number_of_parts` fields may be lower than expected, as not all payment parts will be considered"
2302323023
]
2302423024
},
2302523025
"limit": {
2302623026
"type": "u32",
2302723027
"added": "v24.11",
2302823028
"description": [
23029-
"If `index` is specified, `limit` can be used to specify the maximum number of entries to return."
23029+
"If `index` is specified, `limit` can be used to specify the maximum number of entries to return.",
23030+
"NOTE: if this is used, `amount_sent_msat` and `number_of_parts` fields may be lower than expected, as not all payment parts will be considered",
23031+
"NOTE: the actual number returned may be less than the limit, as individual payment parts are combined together"
2303023032
]
2303123033
}
2303223034
}

doc/schemas/lightning-listpays.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"rpc": "listpays",
55
"title": "Command for querying payment status",
66
"description": [
7-
"The **listpay** RPC command gets the status of all *pay* commands, or a single one if either *bolt11* or *payment_hash* was specified."
7+
"The **listpays** RPC command gets the status of all *pay* commands (by combining results from listsendpays which lists every payment part), or a single one if either *bolt11* or *payment_hash* was specified."
88
],
99
"categories": [
1010
"readonly"
@@ -44,22 +44,24 @@
4444
"updated"
4545
],
4646
"description": [
47-
"If neither *in_channel* nor *out_channel* is specified, it controls ordering."
48-
],
49-
"default": "`created`"
47+
"If neither *in_channel* nor *out_channel* is specified, it controls ordering, by `created` or `updated`."
48+
]
5049
},
5150
"start": {
5251
"type": "u64",
5352
"added": "v24.11",
5453
"description": [
55-
"If `index` is specified, `start` may be specified to start from that value, which is generally returned from lightning-wait(7)."
54+
"If `index` is specified, `start` may be specified to start from that value, which is generally returned from lightning-wait(7).",
55+
"NOTE: if this is used, `amount_sent_msat` and `number_of_parts` fields may be lower than expected, as not all payment parts will be considered"
5656
]
5757
},
5858
"limit": {
5959
"type": "u32",
6060
"added": "v24.11",
6161
"description": [
62-
"If `index` is specified, `limit` can be used to specify the maximum number of entries to return."
62+
"If `index` is specified, `limit` can be used to specify the maximum number of entries to return.",
63+
"NOTE: if this is used, `amount_sent_msat` and `number_of_parts` fields may be lower than expected, as not all payment parts will be considered",
64+
"NOTE: the actual number returned may be less than the limit, as individual payment parts are combined together"
6365
]
6466
}
6567
}

0 commit comments

Comments
 (0)