Skip to content

Commit

Permalink
Fix main (MystenLabs#1599)
Browse files Browse the repository at this point in the history
  • Loading branch information
asonnino authored Apr 26, 2022
1 parent 1493444 commit 7fec599
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
13 changes: 0 additions & 13 deletions sui/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,6 @@ pub struct AuthorityPrivateInfo {
pub consensus_address: SocketAddr,
}

impl Clone for AuthorityPrivateInfo {
fn clone(&self) -> Self {
Self {
key_pair: self.key_pair.copy(),
host: self.host.clone(),
port: self.port,
db_path: self.db_path.clone(),
stake: self.stake,
consensus_address: self.consensus_address,
}
}
}

// Custom deserializer with optional default fields
impl<'de> Deserialize<'de> for AuthorityPrivateInfo {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
Expand Down
3 changes: 2 additions & 1 deletion test_utils/src/authority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ pub fn test_authority_store() -> AuthorityStore {
pub fn test_authority_configs() -> Vec<AuthorityPrivateInfo> {
test_keys()
.into_iter()
.map(|(_, key)| {
.map(|(address, key)| {
let authority_port = PORT_ALLOCATOR.lock().unwrap().next_port().unwrap();
let consensus_port = PORT_ALLOCATOR.lock().unwrap().next_port().unwrap();

AuthorityPrivateInfo {
address,
key_pair: key,
host: "127.0.0.1".to_string(),
port: authority_port,
Expand Down

0 comments on commit 7fec599

Please sign in to comment.