msggen: Use the inferred optional field

Changelog-Changed: msggen: The generated interfaces `cln-rpc` anc `cln-grpc` can now work with a range of versions rather than having to match the CLN version
This commit is contained in:
Christian Decker
2023-03-28 13:59:35 +02:00
committed by Rusty Russell
parent 392cacac81
commit 60b12ec096
7 changed files with 352 additions and 344 deletions

6
cln-rpc/src/model.rs generated
View File

@@ -1728,7 +1728,8 @@ pub mod responses {
pub struct ListpeersPeers {
pub id: PublicKey,
pub connected: bool,
pub num_channels: u32,
#[serde(skip_serializing_if = "Option::is_none")]
pub num_channels: Option<u32>,
#[serde(skip_serializing_if = "crate::is_none_or_empty")]
pub log: Option<Vec<ListpeersPeersLog>>,
#[deprecated]
@@ -1809,7 +1810,8 @@ pub mod responses {
pub connected: bool,
// Path `ListFunds.channels[].state`
pub state: ChannelState,
pub channel_id: Sha256,
#[serde(skip_serializing_if = "Option::is_none")]
pub channel_id: Option<Sha256>,
#[serde(skip_serializing_if = "Option::is_none")]
pub short_channel_id: Option<ShortChannelId>,
}