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!: use a simple network id to differentiate between network #2508

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

RolandSherwin
Copy link
Member

No description provided.

pub static ref IDENTIFY_NODE_VERSION_STR: String =
format!(
"safe/node/{}/{}",
pub static ref IDENTIFY_NODE_VERSION_STR: RwLock<String> =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why need the extra RwLock ?
same to others

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the network_id is now passed as a runtime argument, using --network-id and not an env var that we can fetch here..

"--peer",
"/ip4/127.0.0.1/tcp/8080,/ip4/192.168.1.1/tcp/8081",
"--network-contacts-url",
"http://localhost:8080",

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
let node_data_dir = temp_dir.child("data");
node_data_dir.create_dir_all()?;
let node_logs_dir = temp_dir.child("logs");
node_logs_dir.create_dir_all()?;

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note test

Do not leave debug code in production
OsString::from("--root-dir"),
OsString::from(
node_data_dir
.to_path_buf()

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note test

Do not leave debug code in production
enable_metrics_server: false,
env_variables: None,
home_network: false,
log_format: None,

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note test

Do not leave debug code in production
mock_service_control
.expect_get_process_pid()
.with(eq(current_node_bin.to_path_buf().clone()))
.times(1)

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
@RolandSherwin RolandSherwin added this pull request to the merge queue Dec 9, 2024
Merged via the queue into maidsafe:main with commit 53be33c Dec 9, 2024
28 checks passed
@RolandSherwin RolandSherwin deleted the protocol_str branch December 9, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants