Unverified Commit 3c46f557 authored by Marius van der Wijden's avatar Marius van der Wijden Committed by GitHub

cmd/faucet: sort requests by newest first (#22018)

parent c7f25367
...@@ -516,12 +516,12 @@ func (f *faucet) apiHandler(w http.ResponseWriter, r *http.Request) { ...@@ -516,12 +516,12 @@ func (f *faucet) apiHandler(w http.ResponseWriter, r *http.Request) {
} }
continue continue
} }
f.reqs = append(f.reqs, &request{ f.reqs = append([]*request{{
Avatar: avatar, Avatar: avatar,
Account: address, Account: address,
Time: time.Now(), Time: time.Now(),
Tx: signed, Tx: signed,
}) }}, f.reqs...)
timeout := time.Duration(*minutesFlag*int(math.Pow(3, float64(msg.Tier)))) * time.Minute timeout := time.Duration(*minutesFlag*int(math.Pow(3, float64(msg.Tier)))) * time.Minute
grace := timeout / 288 // 24h timeout => 5m grace grace := timeout / 288 // 24h timeout => 5m grace
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment