Skip to content

Commit 048c718

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 385b6a0 commit 048c718

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
@@ -22539,7 +22539,7 @@
2253922539
"rpc": "listpays",
2254022540
"title": "Command for querying payment status",
2254122541
"description": [
22542-
"The **listpay** RPC command gets the status of all *pay* commands, or a single one if either *bolt11* or *payment_hash* was specified."
22542+
"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."
2254322543
],
2254422544
"categories": [
2254522545
"readonly"
@@ -22579,22 +22579,24 @@
2257922579
"updated"
2258022580
],
2258122581
"description": [
22582-
"If neither *in_channel* nor *out_channel* is specified, it controls ordering."
22583-
],
22584-
"default": "`created`"
22582+
"If neither *in_channel* nor *out_channel* is specified, it controls ordering, by `created` or `updated`."
22583+
]
2258522584
},
2258622585
"start": {
2258722586
"type": "u64",
2258822587
"added": "v24.11",
2258922588
"description": [
22590-
"If `index` is specified, `start` may be specified to start from that value, which is generally returned from lightning-wait(7)."
22589+
"If `index` is specified, `start` may be specified to start from that value, which is generally returned from lightning-wait(7).",
22590+
"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"
2259122591
]
2259222592
},
2259322593
"limit": {
2259422594
"type": "u32",
2259522595
"added": "v24.11",
2259622596
"description": [
22597-
"If `index` is specified, `limit` can be used to specify the maximum number of entries to return."
22597+
"If `index` is specified, `limit` can be used to specify the maximum number of entries to return.",
22598+
"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",
22599+
"NOTE: the actual number returned may be less than the limit, as individual payment parts are combined together"
2259822600
]
2259922601
}
2260022602
}

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)