cmd/faucet: sort requests by newest first (#22018)
This commit is contained in:
parent
c7f2536735
commit
3c46f5570b
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue