Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: default listen on ws port #4729

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions resource/ckb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ cache_size = 268435456
options_file = "default.db-options"

[network]
listen_addresses = ["/ip4/0.0.0.0/tcp/8115"] # {{
# _ => listen_addresses = ["/ip4/0.0.0.0/tcp/{p2p_port}"]
listen_addresses = ["/ip4/0.0.0.0/tcp/8115", "/ip4/0.0.0.0/tcp/8115/ws"] # {{
# _ => listen_addresses = ["/ip4/0.0.0.0/tcp/{p2p_port}", "/ip4/0.0.0.0/tcp/{p2p_port}/ws"]
# }}
### Specify the public and routable network addresses
# public_addresses = []
Expand Down
20 changes: 16 additions & 4 deletions util/app-config/src/tests/app_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ fn test_export_dev_config_files() {
);
assert_eq!(
ckb_config.network.listen_addresses,
vec!["/ip4/0.0.0.0/tcp/8000".parse().unwrap()]
vec![
"/ip4/0.0.0.0/tcp/8000".parse().unwrap(),
"/ip4/0.0.0.0/tcp/8000/ws".parse().unwrap()
]
);
assert_eq!(ckb_config.network.connect_outbound_interval_secs, 15);
assert_eq!(ckb_config.rpc.listen_address, "127.0.0.1:7000");
Expand Down Expand Up @@ -148,7 +151,10 @@ fn test_export_testnet_config_files() {
);
assert_eq!(
ckb_config.network.listen_addresses,
vec!["/ip4/0.0.0.0/tcp/8000".parse().unwrap()]
vec![
"/ip4/0.0.0.0/tcp/8000".parse().unwrap(),
"/ip4/0.0.0.0/tcp/8000/ws".parse().unwrap()
]
);
assert_eq!(ckb_config.network.connect_outbound_interval_secs, 15);
assert_eq!(ckb_config.rpc.listen_address, "127.0.0.1:7000");
Expand Down Expand Up @@ -200,7 +206,10 @@ fn test_export_integration_config_files() {
);
assert_eq!(
ckb_config.network.listen_addresses,
vec!["/ip4/0.0.0.0/tcp/8000".parse().unwrap()]
vec![
"/ip4/0.0.0.0/tcp/8000".parse().unwrap(),
"/ip4/0.0.0.0/tcp/8000/ws".parse().unwrap()
]
);
assert_eq!(ckb_config.rpc.listen_address, "127.0.0.1:7000");
}
Expand Down Expand Up @@ -252,7 +261,10 @@ fn test_export_dev_config_files_assembly() {
);
assert_eq!(
ckb_config.network.listen_addresses,
vec!["/ip4/0.0.0.0/tcp/8000".parse().unwrap()]
vec![
"/ip4/0.0.0.0/tcp/8000".parse().unwrap(),
"/ip4/0.0.0.0/tcp/8000/ws".parse().unwrap()
]
);
assert_eq!(ckb_config.network.connect_outbound_interval_secs, 15);
assert_eq!(ckb_config.rpc.listen_address, "127.0.0.1:7000");
Expand Down
Loading