Skip to content

Commit

Permalink
make sure nym-api provides sorted values for older contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
jstuczyn committed Oct 24, 2024
1 parent b54b0a3 commit 984efda
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions nym-api/src/epoch_operations/rewarded_set_assignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,24 @@ impl EpochAdvancer {
)
}

Ok(RewardedSet {
let mut rewarded_set = RewardedSet {
entry_gateways: entry_gateways.into_iter().collect(),
exit_gateways: exit_gateways.into_iter().collect(),
layer1,
layer2,
layer3,
standby,
})
};

// make sure to sort the rewarded set values
rewarded_set.entry_gateways.sort();
rewarded_set.exit_gateways.sort();
rewarded_set.layer1.sort();
rewarded_set.layer2.sort();
rewarded_set.layer3.sort();
rewarded_set.standby.sort();

Ok(rewarded_set)
}

async fn attach_performance_to_eligible_nodes(
Expand Down

0 comments on commit 984efda

Please sign in to comment.