mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
msggen: Extend support range to v0.10.1 and mark address, added in v23.02
This commit is contained in:
committed by
Rusty Russell
parent
2d53707611
commit
8c02d9587d
@@ -2874,7 +2874,7 @@
|
||||
"deprecated": null
|
||||
},
|
||||
"Getinfo.address[]": {
|
||||
"added": "pre-v0.10.1",
|
||||
"added": "v23.02",
|
||||
"deprecated": false
|
||||
},
|
||||
"Getinfo.address[].address": {
|
||||
|
||||
2
cln-grpc/proto/node.proto
generated
2
cln-grpc/proto/node.proto
generated
@@ -70,7 +70,7 @@ message GetinfoRequest {
|
||||
|
||||
message GetinfoResponse {
|
||||
bytes id = 1;
|
||||
string alias = 2;
|
||||
optional string alias = 2;
|
||||
bytes color = 3;
|
||||
uint32 num_peers = 4;
|
||||
uint32 num_pending_channels = 5;
|
||||
|
||||
4
cln-grpc/src/convert.rs
generated
4
cln-grpc/src/convert.rs
generated
@@ -52,7 +52,7 @@ impl From<responses::GetinfoResponse> for pb::GetinfoResponse {
|
||||
fn from(c: responses::GetinfoResponse) -> Self {
|
||||
Self {
|
||||
id: c.id.serialize().to_vec(), // Rule #2 for type pubkey
|
||||
alias: c.alias, // Rule #2 for type string
|
||||
alias: c.alias, // Rule #2 for type string?
|
||||
color: hex::decode(&c.color).unwrap(), // Rule #2 for type hex
|
||||
num_peers: c.num_peers, // Rule #2 for type u32
|
||||
num_pending_channels: c.num_pending_channels, // Rule #2 for type u32
|
||||
@@ -65,7 +65,7 @@ impl From<responses::GetinfoResponse> for pb::GetinfoResponse {
|
||||
network: c.network, // Rule #2 for type string
|
||||
fees_collected_msat: Some(c.fees_collected_msat.into()), // Rule #2 for type msat
|
||||
// Field: Getinfo.address[]
|
||||
address: c.address.into_iter().map(|i| i.into()).collect(), // Rule #3 for type GetinfoAddress
|
||||
address: c.address.map(|arr| arr.into_iter().map(|i| i.into()).collect()).unwrap_or(vec![]), // Rule #3
|
||||
// Field: Getinfo.binding[]
|
||||
binding: c.binding.map(|arr| arr.into_iter().map(|i| i.into()).collect()).unwrap_or(vec![]), // Rule #3
|
||||
warning_bitcoind_sync: c.warning_bitcoind_sync, // Rule #2 for type string?
|
||||
|
||||
6
cln-rpc/src/model.rs
generated
6
cln-rpc/src/model.rs
generated
@@ -1518,7 +1518,8 @@ pub mod responses {
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct GetinfoResponse {
|
||||
pub id: PublicKey,
|
||||
pub alias: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub alias: Option<String>,
|
||||
pub color: String,
|
||||
pub num_peers: u32,
|
||||
pub num_pending_channels: u32,
|
||||
@@ -1532,7 +1533,8 @@ pub mod responses {
|
||||
pub blockheight: u32,
|
||||
pub network: String,
|
||||
pub fees_collected_msat: Amount,
|
||||
pub address: Vec<GetinfoAddress>,
|
||||
#[serde(skip_serializing_if = "crate::is_none_or_empty")]
|
||||
pub address: Option<Vec<GetinfoAddress>>,
|
||||
#[serde(skip_serializing_if = "crate::is_none_or_empty")]
|
||||
pub binding: Option<Vec<GetinfoBinding>>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
||||
@@ -111,7 +111,7 @@ class OptionalPatch(Patch):
|
||||
# Oldest supported versions. Bump this if you no longer want to
|
||||
# support older versions, and you want to make required fields
|
||||
# more stringent.
|
||||
supported = 'v0.12.0'
|
||||
supported = 'v0.10.1'
|
||||
|
||||
def visit(self, f: model.Field) -> None:
|
||||
if f.added not in self.versions:
|
||||
|
||||
360
contrib/pyln-testing/pyln/testing/node_pb2.py
generated
360
contrib/pyln-testing/pyln/testing/node_pb2.py
generated
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user