Skip to content

Commit 3052b4e

Browse files
committed
doc/schemas: add websocket to type in doc/schemas/notification/connect.json
This is done by tests/test_connection.py::test_websocket: ``` { "jsonrpc": "2.0", "method": "connect", "params": { "connect": { "id": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f", "direction": "in", "address": { "type": "websocket", "subtype": "ipv4", "address": "127.0.0.1", "port": 59412 } } } } ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent 467a25c commit 3052b4e

File tree

6 files changed

+28
-20
lines changed

6 files changed

+28
-20
lines changed

.msggen.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,8 @@
439439
"ipv6": 2,
440440
"local socket": 0,
441441
"torv2": 3,
442-
"torv3": 4
442+
"torv3": 4,
443+
"websocket": 5
443444
},
444445
"PeerConnectDirection": {
445446
"in": 0,

cln-grpc/proto/node.proto

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cln-rpc/src/notifications.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ pub enum PeerConnectAddressType {
8585
TORV2 = 3,
8686
#[serde(rename = "torv3")]
8787
TORV3 = 4,
88+
#[serde(rename = "websocket")]
89+
WEBSOCKET = 5,
8890
}
8991

9092
impl TryFrom<i32> for PeerConnectAddressType {
@@ -96,6 +98,7 @@ impl TryFrom<i32> for PeerConnectAddressType {
9698
2 => Ok(PeerConnectAddressType::IPV6),
9799
3 => Ok(PeerConnectAddressType::TORV2),
98100
4 => Ok(PeerConnectAddressType::TORV3),
101+
5 => Ok(PeerConnectAddressType::WEBSOCKET),
99102
o => Err(anyhow::anyhow!("Unknown variant {} for enum PeerConnectAddressType", o)),
100103
}
101104
}
@@ -109,6 +112,7 @@ impl ToString for PeerConnectAddressType {
109112
PeerConnectAddressType::IPV6 => "IPV6",
110113
PeerConnectAddressType::TORV2 => "TORV2",
111114
PeerConnectAddressType::TORV3 => "TORV3",
115+
PeerConnectAddressType::WEBSOCKET => "WEBSOCKET",
112116
}.to_string()
113117
}
114118
}
@@ -123,13 +127,13 @@ pub struct ConnectAddress {
123127
pub socket: Option<String>,
124128
// Path `connect.address.type`
125129
#[serde(rename = "type")]
126-
pub item_type: ConnectAddressType,
130+
pub item_type: PeerConnectAddressType,
127131
}
128132

129133
#[derive(Clone, Debug, Deserialize, Serialize)]
130134
pub struct ConnectNotification {
131135
// Path `connect.direction`
132-
pub direction: ConnectDirection,
136+
pub direction: PeerConnectDirection,
133137
pub address: ConnectAddress,
134138
pub id: PublicKey,
135139
}

contrib/msggen/msggen/schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35950,7 +35950,8 @@
3595035950
"ipv4",
3595135951
"ipv6",
3595235952
"torv2",
35953-
"torv3"
35953+
"torv3",
35954+
"websocket"
3595435955
],
3595535956
"description": [
3595635957
"Type of connection (*torv2*/*torv3* only if **direction** is *out*)"

contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/schemas/notification/connect.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
"ipv4",
5454
"ipv6",
5555
"torv2",
56-
"torv3"
56+
"torv3",
57+
"websocket"
5758
],
5859
"description": [
5960
"Type of connection (*torv2*/*torv3* only if **direction** is *out*)"

0 commit comments

Comments
 (0)