mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 13:07:17 +00:00
cmd/faucet: add grace period to faucet timeout (#18105)
* Add 5 minute grace period to faucet timeout * cmd/faucet: make grace period dynamic based on original wait time
This commit is contained in:
parent
b80c840af3
commit
3b96c17fc1
@ -506,7 +506,10 @@ func (f *faucet) apiHandler(conn *websocket.Conn) {
|
|||||||
Time: time.Now(),
|
Time: time.Now(),
|
||||||
Tx: signed,
|
Tx: signed,
|
||||||
})
|
})
|
||||||
f.timeouts[username] = time.Now().Add(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
|
||||||
|
|
||||||
|
f.timeouts[username] = time.Now().Add(timeout - grace)
|
||||||
fund = true
|
fund = true
|
||||||
}
|
}
|
||||||
f.lock.Unlock()
|
f.lock.Unlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user