Use the accounts list from parents up to finalized bank for Account::load apis.

Borrow checker

query the previous parents accounts

cleanup!

s/tree/parents

Tests!  Last_ids need to be inherited as well otherwise nothing works.

new_from_parent
This commit is contained in:
Anatoly Yakovenko
2019-02-16 21:35:20 -08:00
committed by Greg Fitzgerald
parent 6d67568037
commit 64f1d93cc3
2 changed files with 3 additions and 12 deletions

View File

@ -363,9 +363,10 @@ impl Fullnode {
}
None => FullnodeReturnType::LeaderToLeaderRotation, // value doesn't matter here...
};
let mut new: Arc<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(
&Arc::new(self.bank.copy_for_tpu()),
&self.bank,
PohServiceConfig::default(),
self.tpu_sockets
.iter()