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

revert-23120-drop-eth-65
Marius van der Wijden 4 years ago committed by GitHub
parent c7f2536735
commit 3c46f5570b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      cmd/faucet/faucet.go

@ -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

Loading…
Cancel
Save