mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-31 22:45:39 -05:00
gofmt
This commit is contained in:
@@ -53,4 +53,4 @@ type GetInbound interface {
|
||||
|
||||
type GetOutbound interface {
|
||||
GetOutbound() Outbound
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@ const (
|
||||
)
|
||||
|
||||
type idEntry struct {
|
||||
id *protocol.ID
|
||||
userIdx int
|
||||
lastSec protocol.Timestamp
|
||||
id *protocol.ID
|
||||
userIdx int
|
||||
lastSec protocol.Timestamp
|
||||
}
|
||||
|
||||
type TimedUserValidator struct {
|
||||
@@ -114,17 +114,17 @@ func (v *TimedUserValidator) Add(user *protocol.User) error {
|
||||
nowSec := time.Now().Unix()
|
||||
|
||||
entry := &idEntry{
|
||||
id: account.ID,
|
||||
userIdx: idx,
|
||||
lastSec: protocol.Timestamp(nowSec - cacheDurationSec),
|
||||
id: account.ID,
|
||||
userIdx: idx,
|
||||
lastSec: protocol.Timestamp(nowSec - cacheDurationSec),
|
||||
}
|
||||
v.generateNewHashes(protocol.Timestamp(nowSec+cacheDurationSec), idx, entry)
|
||||
v.ids = append(v.ids, entry)
|
||||
for _, alterid := range account.AlterIDs {
|
||||
entry := &idEntry{
|
||||
id: alterid,
|
||||
userIdx: idx,
|
||||
lastSec: protocol.Timestamp(nowSec - cacheDurationSec),
|
||||
id: alterid,
|
||||
userIdx: idx,
|
||||
lastSec: protocol.Timestamp(nowSec - cacheDurationSec),
|
||||
}
|
||||
v.generateNewHashes(protocol.Timestamp(nowSec+cacheDurationSec), idx, entry)
|
||||
v.ids = append(v.ids, entry)
|
||||
|
||||
Reference in New Issue
Block a user