Add RepairWeight to track votes seen in gossip for weighted repair (#10903)

* Add RepairWeight

Co-authored-by: Carl <carl@solana.com>
This commit is contained in:
carllin
2020-07-06 22:49:40 -07:00
committed by GitHub
parent 119949d4d8
commit 3f6042d8b3
6 changed files with 1252 additions and 9 deletions

View File

@@ -353,7 +353,8 @@ impl Blockstore {
let mut walk = TreeWalk::from(forks);
while let Some(visit) = walk.get() {
let slot = visit.node().data;
if self.meta(slot).unwrap().is_some() {
if self.meta(slot).unwrap().is_some() && self.orphan(slot).unwrap().is_none() {
// If slot exists and is not an orphan, then skip it
walk.forward();
continue;
}