Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Fully replace NodeInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Jul 2, 2021
1 parent 71efac4 commit db3a9ae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion gossip/src/cluster_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ impl ClusterInfo {
self.gossip.write().unwrap().set_self(&id);
{
let mut instance = self.instance.write().unwrap();
*instance = instance.with_id(id);
*instance = NodeInstance::new(&mut thread_rng(), id, timestamp());
}
*self.keypair.write().unwrap() = new_keypair;
self.my_contact_info.write().unwrap().id = id;
Expand Down
5 changes: 0 additions & 5 deletions gossip/src/crds_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,6 @@ impl NodeInstance {
}
}

// Clones the value with an updated id.
pub(crate) fn with_id(&self, from: Pubkey) -> Self {
Self { from, ..*self }
}

// Clones the value with an updated wallclock.
pub(crate) fn with_wallclock(&self, wallclock: u64) -> Self {
Self { wallclock, ..*self }
Expand Down

0 comments on commit db3a9ae

Please sign in to comment.