mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-18 22:54:25 +01:00
msggen: Add two missing fields to the listpays schema
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!
This commit is contained in:
committed by
Rusty Russell
parent
7915a9d678
commit
7b8ea7f60a
16
.msggen.json
16
.msggen.json
@@ -3810,6 +3810,14 @@
|
|||||||
"added": "pre-v0.10.1",
|
"added": "pre-v0.10.1",
|
||||||
"deprecated": null
|
"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": {
|
"ListPays.bolt11": {
|
||||||
"added": "pre-v0.10.1",
|
"added": "pre-v0.10.1",
|
||||||
"deprecated": false
|
"deprecated": false
|
||||||
@@ -3822,6 +3830,14 @@
|
|||||||
"added": "pre-v0.10.1",
|
"added": "pre-v0.10.1",
|
||||||
"deprecated": false
|
"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": {
|
"ListPays.pays[].bolt11": {
|
||||||
"added": "pre-v0.10.1",
|
"added": "pre-v0.10.1",
|
||||||
"deprecated": false
|
"deprecated": false
|
||||||
|
|||||||
2
cln-grpc/proto/node.proto
generated
2
cln-grpc/proto/node.proto
generated
@@ -1627,6 +1627,8 @@ message ListpaysPays {
|
|||||||
optional string bolt11 = 6;
|
optional string bolt11 = 6;
|
||||||
optional string description = 11;
|
optional string description = 11;
|
||||||
optional string bolt12 = 7;
|
optional string bolt12 = 7;
|
||||||
|
optional Amount amount_msat = 8;
|
||||||
|
optional Amount amount_sent_msat = 9;
|
||||||
optional bytes preimage = 13;
|
optional bytes preimage = 13;
|
||||||
optional uint64 number_of_parts = 14;
|
optional uint64 number_of_parts = 14;
|
||||||
optional bytes erroronion = 10;
|
optional bytes erroronion = 10;
|
||||||
|
|||||||
2
cln-grpc/src/convert.rs
generated
2
cln-grpc/src/convert.rs
generated
@@ -1487,6 +1487,8 @@ impl From<responses::ListpaysPays> for pb::ListpaysPays {
|
|||||||
bolt11: c.bolt11, // Rule #2 for type string?
|
bolt11: c.bolt11, // Rule #2 for type string?
|
||||||
description: c.description, // Rule #2 for type string?
|
description: c.description, // Rule #2 for type string?
|
||||||
bolt12: c.bolt12, // Rule #2 for type string?
|
bolt12: c.bolt12, // Rule #2 for type string?
|
||||||
|
amount_msat: c.amount_msat.map(|f| f.into()), // Rule #2 for type msat?
|
||||||
|
amount_sent_msat: c.amount_sent_msat.map(|f| f.into()), // Rule #2 for type msat?
|
||||||
preimage: c.preimage.map(|v| v.to_vec()), // Rule #2 for type secret?
|
preimage: c.preimage.map(|v| v.to_vec()), // Rule #2 for type secret?
|
||||||
number_of_parts: c.number_of_parts, // Rule #2 for type u64?
|
number_of_parts: c.number_of_parts, // Rule #2 for type u64?
|
||||||
erroronion: c.erroronion.map(|v| hex::decode(v).unwrap()), // Rule #2 for type hex?
|
erroronion: c.erroronion.map(|v| hex::decode(v).unwrap()), // Rule #2 for type hex?
|
||||||
|
|||||||
4
cln-rpc/src/model.rs
generated
4
cln-rpc/src/model.rs
generated
@@ -4662,6 +4662,10 @@ pub mod responses {
|
|||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub bolt12: Option<String>,
|
pub bolt12: Option<String>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub amount_msat: Option<Amount>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub amount_sent_msat: Option<Amount>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub preimage: Option<Secret>,
|
pub preimage: Option<Secret>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub number_of_parts: Option<u64>,
|
pub number_of_parts: Option<u64>,
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1277,6 +1277,8 @@ def listpays_pays2py(m):
|
|||||||
"bolt11": m.bolt11, # PrimitiveField in generate_composite
|
"bolt11": m.bolt11, # PrimitiveField in generate_composite
|
||||||
"description": m.description, # PrimitiveField in generate_composite
|
"description": m.description, # PrimitiveField in generate_composite
|
||||||
"bolt12": m.bolt12, # 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
|
"preimage": hexlify(m.preimage), # PrimitiveField in generate_composite
|
||||||
"number_of_parts": m.number_of_parts, # PrimitiveField in generate_composite
|
"number_of_parts": m.number_of_parts, # PrimitiveField in generate_composite
|
||||||
"erroronion": hexlify(m.erroronion), # PrimitiveField in generate_composite
|
"erroronion": hexlify(m.erroronion), # PrimitiveField in generate_composite
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ On success, an object containing **pays** is returned. It is an array of object
|
|||||||
|
|
||||||
If **status** is "complete":
|
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
|
- **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).
|
- **number\_of\_parts** (u64, optional): the number of parts for a successful payment (only if more than one).
|
||||||
|
|
||||||
If **status** is "failed":
|
If **status** is "failed":
|
||||||
@@ -57,4 +59,4 @@ RESOURCES
|
|||||||
|
|
||||||
Main web site: <https://github.com/ElementsProject/lightning>
|
Main web site: <https://github.com/ElementsProject/lightning>
|
||||||
|
|
||||||
[comment]: # ( SHA256STAMP:716bcbf01d946c6e4da0bd2f6817c34e6471a1fcd2f0f388ce47984271285c72)
|
[comment]: # ( SHA256STAMP:1485c07b6a62b67169675ecd1e6e42f34fb371c2eb687adf7451ad1bec5dcc50)
|
||||||
|
|||||||
@@ -87,8 +87,14 @@
|
|||||||
"bolt11": {},
|
"bolt11": {},
|
||||||
"description": {},
|
"description": {},
|
||||||
"bolt12": {},
|
"bolt12": {},
|
||||||
"amount_msat": {},
|
"amount_msat": {
|
||||||
"amount_sent_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": {
|
"preimage": {
|
||||||
"type": "secret",
|
"type": "secret",
|
||||||
"description": "proof of payment"
|
"description": "proof of payment"
|
||||||
|
|||||||
Reference in New Issue
Block a user