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`
```

Changelog-Changed: Channel type `anchors/even` was added
to the grpc bindings.
  • Loading branch information
JssDWt authored and ShahanaFarooqui committed Sep 20, 2024
1 parent aba67a7 commit 8ff1e1e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 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
12 changes: 6 additions & 6 deletions contrib/pyln-grpc-proto/pyln/grpc/primitives_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8ff1e1e

Please sign in to comment.