Add sampling logic and DuplicateSlotRepairStatus module (#18721)

This commit is contained in:
carllin
2021-07-21 11:15:08 -07:00
committed by GitHub
parent d751d5b6e8
commit 588c0464b8
11 changed files with 951 additions and 321 deletions

View File

@@ -125,7 +125,7 @@ impl ClusterNodes<RetransmitStage> {
.unzip(),
};
let index: Vec<_> = {
let shuffle = weighted_shuffle(&weights, shred_seed);
let shuffle = weighted_shuffle(weights.into_iter(), shred_seed);
shuffle.into_iter().map(|i| index[i]).collect()
};
let self_index = index