This commit is contained in:
Trent Nelson
2022-02-24 14:09:25 -07:00
committed by mergify[bot]
parent 97b5a71ceb
commit d4292774c5
6 changed files with 11 additions and 10 deletions

View File

@@ -2715,7 +2715,8 @@ mod test {
stake
);
}
for slot in &[17] {
{
let slot = &17;
assert_eq!(
tree1
.stake_voted_subtree(&(*slot, Hash::default()))

View File

@@ -642,7 +642,7 @@ impl RepairWeight {
}
// Heavier, smaller slots come first
fn sort_by_stake_weight_slot(slot_stake_voted: &mut Vec<(Slot, u64)>) {
fn sort_by_stake_weight_slot(slot_stake_voted: &mut [(Slot, u64)]) {
slot_stake_voted.sort_by(|(slot, stake_voted), (slot_, stake_voted_)| {
if stake_voted == stake_voted_ {
slot.cmp(slot_)