[TrueCloudLab/hrw#2] sdk-go: Use typed HRW methods

Update HRW pkg and use typed HRW methods to sort nodes

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-02-28 14:04:02 +03:00 committed by fyrchik
parent e355e5eeba
commit 2cbc585edd
5 changed files with 8 additions and 6 deletions

View file

@ -152,7 +152,7 @@ func (m NetMap) PlacementVectors(vectors [][]NodeInfo, pivot []byte) ([][]NodeIn
for i := range vectors {
result[i] = make([]NodeInfo, len(vectors[i]))
copy(result[i], vectors[i])
hrw.SortSliceByWeightValue(result[i], nodes(result[i]).weights(wf), h)
hrw.SortHasherSliceByWeightValue(result[i], nodes(result[i]).weights(wf), h)
}
return result, nil