Skip to content

Commit

Permalink
fix: remove one unneeded instance of key_pair.copy()
Browse files Browse the repository at this point in the history
  • Loading branch information
huitseeker committed Apr 22, 2022
1 parent 2dcc728 commit 682f3a3
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions sui/src/unit_tests/sui_network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,11 @@ pub async fn start_test_network(

let mut genesis_config =
genesis_config.unwrap_or(GenesisConfig::default_genesis(&working_dir)?);
let authorities = genesis_config
genesis_config.authorities = genesis_config
.authorities
.iter()
.map(|info| AuthorityPrivateInfo {
key_pair: info.key_pair.copy(),
host: info.host.clone(),
port: 0,
db_path: info.db_path.clone(),
stake: info.stake,
consensus_address: info.consensus_address,
})
.into_iter()
.map(|info| AuthorityPrivateInfo { port: 0, ..info })
.collect();
genesis_config.authorities = authorities;

let (network_config, accounts, mut keystore) = genesis(genesis_config).await?;
let network = SuiNetwork::start(&network_config).await?;
Expand Down

0 comments on commit 682f3a3

Please sign in to comment.