Skip to content
Snippets Groups Projects
Commit ce219bba authored by benjamin's avatar benjamin
Browse files

minor fixes to round sorting

parent 3441c3fd
No related branches found
No related tags found
2 merge requests!67makes the system more agressive in selecting a round to send messages to, and...,!66Merge release into master
...@@ -160,13 +160,13 @@ func (wr *WaitingRounds) storeReadRounds() { ...@@ -160,13 +160,13 @@ func (wr *WaitingRounds) storeReadRounds() {
//sort the rounds list, soonest first //sort the rounds list, soonest first
sort.Slice(roundsList, func(i, j int) bool { sort.Slice(roundsList, func(i, j int) bool {
return roundsList[i].StartTime().After(roundsList[j].StartTime()) return roundsList[i].StartTime().Before(roundsList[j].StartTime())
}) })
var rprint string var rprint string
for _, r := range roundsList { for _, r := range roundsList {
rprint += fmt.Sprintf("\n\tround: %d, startTime: %s, time to start: %s", rprint += fmt.Sprintf("\n\tround: %d, startTime: %s, time to start: %s",
r.info.ID, r.StartTime(), netTime.Since(r.StartTime())) r.info.ID, r.StartTime(), netTime.Until(r.StartTime()))
} }
jww.INFO.Printf("Rounds Order: %s", rprint) jww.INFO.Printf("Rounds Order: %s", rprint)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment