From 736938fda793d2ee6b18e8e428225c4fde3e6c83 Mon Sep 17 00:00:00 2001 From: Jesse de Wit Date: Fri, 30 Aug 2024 11:44:01 +0200 Subject: [PATCH] cln-grpc: add anchors/even to primitives The `anchors/even` channel type was missing from the grpc bindings. It is now the default channel type, so `fundchannel` over grpc fails with: ``` Failed to deserialize response : unknown variant `anchors/even`, expected one of `static_remotekey/even`, `anchor_outputs/even`, `anchors_zero_fee_htlc_tx/even`, `scid_alias/even`, `zeroconf/even` ``` This commit adds the `anchors/even` channel type to the grpc bindings. --- cln-grpc/proto/primitives.proto | 1 + cln-rpc/src/primitives.rs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/cln-grpc/proto/primitives.proto b/cln-grpc/proto/primitives.proto index 8916b84f20c1..f592172bcae4 100644 --- a/cln-grpc/proto/primitives.proto +++ b/cln-grpc/proto/primitives.proto @@ -127,6 +127,7 @@ enum ChannelTypeName { anchors_zero_fee_htlc_tx_even = 2; scid_alias_even = 3; zeroconf_even = 4; + anchors_even = 5; } enum AutocleanSubsystem { diff --git a/cln-rpc/src/primitives.rs b/cln-rpc/src/primitives.rs index 8d7ef03bb48f..0d05c3aa2a10 100644 --- a/cln-rpc/src/primitives.rs +++ b/cln-rpc/src/primitives.rs @@ -67,6 +67,8 @@ pub enum ChannelTypeName { SCID_ALIAS_EVEN = 3, #[serde(rename = "zeroconf/even")] ZEROCONF_EVEN = 4, + #[serde(rename = "anchors/even")] + ANCHORS_EVEN = 5, } #[derive(Copy, Clone, Serialize, Deserialize, Debug)] @@ -407,6 +409,7 @@ impl From for ChannelTypeName { 2 => ChannelTypeName::ANCHORS_ZERO_FEE_HTLC_TX_EVEN, 3 => ChannelTypeName::SCID_ALIAS_EVEN, 4 => ChannelTypeName::ZEROCONF_EVEN, + 5 => ChannelTypeName::ANCHORS_EVEN, o => panic!("Unmapped ChannelTypeName {}", o), } } @@ -420,6 +423,7 @@ impl From for i32 { ChannelTypeName::ANCHORS_ZERO_FEE_HTLC_TX_EVEN => 2, ChannelTypeName::SCID_ALIAS_EVEN => 3, ChannelTypeName::ZEROCONF_EVEN => 4, + ChannelTypeName::ANCHORS_EVEN => 5, } } }