copy a new bank

This commit is contained in:
Anatoly Yakovenko 2019-02-17 11:58:37 -08:00 committed by Greg Fitzgerald
parent 64f1d93cc3
commit 8166925f04
1 changed files with 2 additions and 3 deletions

View File

@ -363,10 +363,9 @@ impl Fullnode {
} }
None => FullnodeReturnType::LeaderToLeaderRotation, // value doesn't matter here... None => FullnodeReturnType::LeaderToLeaderRotation, // value doesn't matter here...
}; };
let mut new: Arc<Bank> = Arc::new(Bank::new_from_parent(self.bank.clone())); let tpu_bank = Arc::new(Bank::new_from_parent(self.bank.clone()));
std::mem::swap(&mut self.bank, &mut new);
self.node_services.tpu.switch_to_leader( self.node_services.tpu.switch_to_leader(
&self.bank, &tpu_bank,
PohServiceConfig::default(), PohServiceConfig::default(),
self.tpu_sockets self.tpu_sockets
.iter() .iter()