[#1648] morph: Change endpoint priority order

The lowest value means the highest priority.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-08-02 14:31:21 +03:00 committed by Pavel Karpy
parent 2467be0117
commit a97dee008c
10 changed files with 67 additions and 17 deletions

View file

@ -19,7 +19,7 @@ type endpoints struct {
func (e *endpoints) init(ee []Endpoint) {
sort.SliceStable(ee, func(i, j int) bool {
return ee[i].Priority > ee[j].Priority
return ee[i].Priority < ee[j].Priority
})
e.curr = 0