Skip to content

Commit

Permalink
msggen: Add two missing fields to the listpays schema
Browse files Browse the repository at this point in the history
The fields were missing because they weren't annotated with a type and
a description. Adding those fixes them.

Changelog-Fixed: msggen: `listpays` now includes the missing `amount_msat` and `amount_sent_msat` fields
No-schema-diff-check: fields were always there, just undocumented!
  • Loading branch information
cdecker authored and rustyrussell committed Jul 27, 2023
1 parent 7915a9d commit 7b8ea7f
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 51 deletions.
16 changes: 16 additions & 0 deletions .msggen.json
Original file line number Diff line number Diff line change
Expand Up @@ -3810,6 +3810,14 @@
"added": "pre-v0.10.1",
"deprecated": null
},
"ListPays.amount_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"ListPays.amount_sent_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"ListPays.bolt11": {
"added": "pre-v0.10.1",
"deprecated": false
Expand All @@ -3822,6 +3830,14 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"ListPays.pays[].amount_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"ListPays.pays[].amount_sent_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"ListPays.pays[].bolt11": {
"added": "pre-v0.10.1",
"deprecated": false
Expand Down
2 changes: 2 additions & 0 deletions cln-grpc/proto/node.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions cln-grpc/src/convert.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions cln-rpc/src/model.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

96 changes: 48 additions & 48 deletions contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions contrib/pyln-testing/pyln/testing/grpc2py.py
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,8 @@ def listpays_pays2py(m):
"bolt11": m.bolt11, # PrimitiveField in generate_composite
"description": m.description, # PrimitiveField in generate_composite
"bolt12": m.bolt12, # PrimitiveField in generate_composite
"amount_msat": amount2msat(m.amount_msat), # PrimitiveField in generate_composite
"amount_sent_msat": amount2msat(m.amount_sent_msat), # PrimitiveField in generate_composite
"preimage": hexlify(m.preimage), # PrimitiveField in generate_composite
"number_of_parts": m.number_of_parts, # PrimitiveField in generate_composite
"erroronion": hexlify(m.erroronion), # PrimitiveField in generate_composite
Expand Down
4 changes: 3 additions & 1 deletion doc/lightning-listpays.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ On success, an object containing **pays** is returned. It is an array of object

If **status** is "complete":

- **amount\_sent\_msat** (msat): The amount of millisatoshi we sent in order to pay (may include fees and not match amount\_msat)
- **preimage** (secret): proof of payment
- **amount\_msat** (msat, optional): The amount of millisatoshi we intended to send to the destination
- **number\_of\_parts** (u64, optional): the number of parts for a successful payment (only if more than one).

If **status** is "failed":
Expand All @@ -57,4 +59,4 @@ RESOURCES

Main web site: <https://github.com/ElementsProject/lightning>

[comment]: # ( SHA256STAMP:716bcbf01d946c6e4da0bd2f6817c34e6471a1fcd2f0f388ce47984271285c72)
[comment]: # ( SHA256STAMP:1485c07b6a62b67169675ecd1e6e42f34fb371c2eb687adf7451ad1bec5dcc50)
10 changes: 8 additions & 2 deletions doc/schemas/listpays.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,14 @@
"bolt11": {},
"description": {},
"bolt12": {},
"amount_msat": {},
"amount_sent_msat": {},
"amount_msat": {
"type": "msat",
"description": "The amount of millisatoshi we intended to send to the destination"
},
"amount_sent_msat": {
"type": "msat",
"description": "The amount of millisatoshi we sent in order to pay (may include fees and not match amount_msat)"
},
"preimage": {
"type": "secret",
"description": "proof of payment"
Expand Down

0 comments on commit 7b8ea7f

Please sign in to comment.