Skip to content

Commit

Permalink
cmd/faucet: sort requests by newest first (#22018)
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusVanDerWijden authored Dec 17, 2020
1 parent c7f2536 commit 3c46f55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/faucet/faucet.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,12 +516,12 @@ func (f *faucet) apiHandler(w http.ResponseWriter, r *http.Request) {
}
continue
}
f.reqs = append(f.reqs, &request{
f.reqs = append([]*request{{
Avatar: avatar,
Account: address,
Time: time.Now(),
Tx: signed,
})
}}, f.reqs...)
timeout := time.Duration(*minutesFlag*int(math.Pow(3, float64(msg.Tier)))) * time.Minute
grace := timeout / 288 // 24h timeout => 5m grace

Expand Down

0 comments on commit 3c46f55

Please sign in to comment.