Skip to content

Commit fcdbbd8

Browse files
rustyrussellvincenzopalazzo
authored andcommitted
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 c4e67c0 commit fcdbbd8

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
@@ -23584,7 +23584,7 @@
2358423584
"rpc": "listpays",
2358523585
"title": "Command for querying payment status",
2358623586
"description": [
23587-
"The **listpay** RPC command gets the status of all *pay* commands, or a single one if either *bolt11* or *payment_hash* was specified."
23587+
"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."
2358823588
],
2358923589
"categories": [
2359023590
"readonly"
@@ -23624,22 +23624,24 @@
2362423624
"updated"
2362523625
],
2362623626
"description": [
23627-
"If neither *in_channel* nor *out_channel* is specified, it controls ordering."
23628-
],
23629-
"default": "`created`"
23627+
"If neither *in_channel* nor *out_channel* is specified, it controls ordering, by `created` or `updated`."
23628+
]
2363023629
},
2363123630
"start": {
2363223631
"type": "u64",
2363323632
"added": "v24.11",
2363423633
"description": [
23635-
"If `index` is specified, `start` may be specified to start from that value, which is generally returned from lightning-wait(7)."
23634+
"If `index` is specified, `start` may be specified to start from that value, which is generally returned from lightning-wait(7).",
23635+
"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"
2363623636
]
2363723637
},
2363823638
"limit": {
2363923639
"type": "u32",
2364023640
"added": "v24.11",
2364123641
"description": [
23642-
"If `index` is specified, `limit` can be used to specify the maximum number of entries to return."
23642+
"If `index` is specified, `limit` can be used to specify the maximum number of entries to return.",
23643+
"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",
23644+
"NOTE: the actual number returned may be less than the limit, as individual payment parts are combined together"
2364323645
]
2364423646
}
2364523647
}

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)