From 83c690fe5f7b9312a4c29b1c045ce1facafd3e0b Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 30 Jan 2023 16:39:03 +1030 Subject: [PATCH] doc: fix listsendpays man page. We actually had a partid allowed (in the oneOf clauses), but didn''t document it. Signed-off-by: Rusty Russell --- .msggen.json | 1 + cln-grpc/proto/node.proto | 1 + cln-grpc/src/convert.rs | 1 + cln-rpc/src/model.rs | 2 ++ contrib/pyln-testing/pyln/testing/grpc2py.py | 1 + doc/lightning-listsendpays.7.md | 3 ++- doc/schemas/listsendpays.schema.json | 4 ++++ 7 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.msggen.json b/.msggen.json index 1178f8385c4e..311d64ee04d9 100644 --- a/.msggen.json +++ b/.msggen.json @@ -819,6 +819,7 @@ "ListSendPays.payments[].groupid": 2, "ListSendPays.payments[].id": 1, "ListSendPays.payments[].label": 9, + "ListSendPays.payments[].partid": 15, "ListSendPays.payments[].payment_hash": 3, "ListSendPays.payments[].payment_preimage": 12, "ListSendPays.payments[].status": 4 diff --git a/cln-grpc/proto/node.proto b/cln-grpc/proto/node.proto index c15e8c7f2dbb..981ae294649f 100644 --- a/cln-grpc/proto/node.proto +++ b/cln-grpc/proto/node.proto @@ -719,6 +719,7 @@ message ListsendpaysPayments { } uint64 id = 1; uint64 groupid = 2; + optional uint64 partid = 15; bytes payment_hash = 3; ListsendpaysPaymentsStatus status = 4; optional Amount amount_msat = 5; diff --git a/cln-grpc/src/convert.rs b/cln-grpc/src/convert.rs index 9e8cd80a4ee4..6b8032f5ad2d 100644 --- a/cln-grpc/src/convert.rs +++ b/cln-grpc/src/convert.rs @@ -574,6 +574,7 @@ impl From for pb::ListsendpaysPayments { Self { id: c.id, // Rule #2 for type u64 groupid: c.groupid, // Rule #2 for type u64 + partid: c.partid, // Rule #2 for type u64? payment_hash: c.payment_hash.to_vec(), // Rule #2 for type hash status: c.status as i32, amount_msat: c.amount_msat.map(|f| f.into()), // Rule #2 for type msat? diff --git a/cln-rpc/src/model.rs b/cln-rpc/src/model.rs index 5be4b8e879d3..cca63253dafc 100644 --- a/cln-rpc/src/model.rs +++ b/cln-rpc/src/model.rs @@ -2473,6 +2473,8 @@ pub mod responses { pub struct ListsendpaysPayments { pub id: u64, pub groupid: u64, + #[serde(skip_serializing_if = "Option::is_none")] + pub partid: Option, pub payment_hash: Sha256, // Path `ListSendPays.payments[].status` pub status: ListsendpaysPaymentsStatus, diff --git a/contrib/pyln-testing/pyln/testing/grpc2py.py b/contrib/pyln-testing/pyln/testing/grpc2py.py index 3e8e2eb8f488..28b366c8bdda 100644 --- a/contrib/pyln-testing/pyln/testing/grpc2py.py +++ b/contrib/pyln-testing/pyln/testing/grpc2py.py @@ -465,6 +465,7 @@ def listsendpays_payments2py(m): return remove_default({ "id": m.id, # PrimitiveField in generate_composite "groupid": m.groupid, # PrimitiveField in generate_composite + "partid": m.partid, # PrimitiveField in generate_composite "payment_hash": hexlify(m.payment_hash), # PrimitiveField in generate_composite "status": str(m.status), # EnumField in generate_composite "amount_msat": amount2msat(m.amount_msat), # PrimitiveField in generate_composite diff --git a/doc/lightning-listsendpays.7.md b/doc/lightning-listsendpays.7.md index 1d734b40c28f..52ddbd108db8 100644 --- a/doc/lightning-listsendpays.7.md +++ b/doc/lightning-listsendpays.7.md @@ -31,6 +31,7 @@ On success, an object containing **payments** is returned. It is an array of ob - **status** (string): status of the payment (one of "pending", "failed", "complete") - **created\_at** (u64): the UNIX timestamp showing when this payment was initiated - **amount\_sent\_msat** (msat): The amount sent +- **partid** (u64, optional): Part number (for multiple parts to a single payment) - **amount\_msat** (msat, optional): The amount delivered to destination (if known) - **destination** (pubkey, optional): the final destination of the payment if known - **label** (string, optional): the label, if given to sendpay @@ -64,4 +65,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:c7a067147e3275afa7f0cad68a6e1d9c0a10fad038a7b95b9c173edf523aee23) +[comment]: # ( SHA256STAMP:a6dcb3708d706650f74fcdd4d05614a813ac5a69c13c4c579d45c01b106545e2) diff --git a/doc/schemas/listsendpays.schema.json b/doc/schemas/listsendpays.schema.json index 3c57246e2776..ed0cb013ed99 100644 --- a/doc/schemas/listsendpays.schema.json +++ b/doc/schemas/listsendpays.schema.json @@ -28,6 +28,10 @@ "type": "u64", "description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash" }, + "partid": { + "type": "u64", + "description": "Part number (for multiple parts to a single payment)" + }, "payment_hash": { "type": "hash", "description": "the hash of the *payment_preimage* which will prove payment",