1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-04-07 14:25:26 -04:00

cleanup unnecessary method in serial.

This commit is contained in:
Darien Raymond
2018-11-02 18:20:02 +01:00
parent ad462860e2
commit 35ccc3a49c
18 changed files with 80 additions and 140 deletions

View File

@@ -5,9 +5,9 @@ import (
"time"
"v2ray.com/core/common"
"v2ray.com/core/common/uuid"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/uuid"
"v2ray.com/core/common/vio"
. "v2ray.com/core/proxy/vmess"
. "v2ray.com/ext/assert"
)
@@ -39,7 +39,7 @@ func TestUserValidator(t *testing.T) {
testSmallLag := func(lag time.Duration) {
ts := protocol.Timestamp(time.Now().Add(time.Second * lag).Unix())
idHash := hasher(id.Bytes())
idHash.Write(ts.Bytes(nil))
common.Must2(vio.WriteUint64(idHash, uint64(ts)))
userHash := idHash.Sum(nil)
euser, ets, found := v.Get(userHash)
@@ -61,7 +61,7 @@ func TestUserValidator(t *testing.T) {
testBigLag := func(lag time.Duration) {
ts := protocol.Timestamp(time.Now().Add(time.Second * lag).Unix())
idHash := hasher(id.Bytes())
idHash.Write(ts.Bytes(nil))
common.Must2(vio.WriteUint64(idHash, uint64(ts)))
userHash := idHash.Sum(nil)
euser, _, found := v.Get(userHash)