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

Enable Running Validator As Process & Container #1437

Merged
merged 3 commits into from
Apr 19, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
clippy
  • Loading branch information
oxade committed Apr 19, 2022
commit d58b6341adda844d61507a02569f77d3206f3ba2
8 changes: 6 additions & 2 deletions sui/src/sui_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ impl SuiCommand {
.wait_for_completion()
.await
}
SuiCommand::Genesis { working_dir, force, from_config } => {
SuiCommand::Genesis {
working_dir,
force,
from_config,
} => {
let sui_config_dir = &match working_dir {
// if a directory is specified, it must exist (it
// will not be created)
Expand Down Expand Up @@ -132,7 +136,7 @@ impl SuiCommand {
let gateway_db_folder_path = sui_config_dir.join("gateway_client_db");

let genesis_conf = match from_config {
Some(q) => PersistedConfig::read(q)?,
Some(q) => PersistedConfig::read(q)?,
None => GenesisConfig::default_genesis(sui_config_dir)?,
};

Expand Down
10 changes: 2 additions & 8 deletions sui/src/unit_tests/cli_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ async fn test_genesis() -> Result<(), anyhow::Error> {
.await;
assert!(matches!(start, Err(..)));
// Genesis
SuiCommand::Genesis {
working_dir: Some(working_dir.to_path_buf()),
force: false,
}
SuiCommand::Genesis {working_dir:Some(working_dir.to_path_buf()),force:false, from_config: None }
.execute()
.await?;
assert!(logs_contain("Network genesis completed."));
Expand Down Expand Up @@ -104,10 +101,7 @@ async fn test_genesis() -> Result<(), anyhow::Error> {
assert_eq!(5, wallet_conf.accounts.len());

// Genesis 2nd time should fail
let result = SuiCommand::Genesis {
working_dir: Some(working_dir.to_path_buf()),
force: false,
}
let result = SuiCommand::Genesis {working_dir:Some(working_dir.to_path_buf()),force:false, from_config: None }
.execute()
.await;
assert!(matches!(result, Err(..)));
Expand Down
5 changes: 4 additions & 1 deletion sui/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ async fn main() -> Result<(), anyhow::Error> {
)
})?;

info!("Started {:?} authority", net_cfg);
info!(
"Started {} authority on {}:{}",
address, net_cfg.host, net_cfg.port
);

if let Err(e) = make_server(
net_cfg,
Expand Down