Skip to content

Commit

Permalink
cln-grpc: add anchors/even to primitives
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JssDWt committed Aug 30, 2024
1 parent 5ec5580 commit 736938f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions cln-grpc/proto/primitives.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions cln-rpc/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -407,6 +409,7 @@ impl From<i32> 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),
}
}
Expand All @@ -420,6 +423,7 @@ impl From<ChannelTypeName> for i32 {
ChannelTypeName::ANCHORS_ZERO_FEE_HTLC_TX_EVEN => 2,
ChannelTypeName::SCID_ALIAS_EVEN => 3,
ChannelTypeName::ZEROCONF_EVEN => 4,
ChannelTypeName::ANCHORS_EVEN => 5,
}
}
}
Expand Down

0 comments on commit 736938f

Please sign in to comment.