mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-25 23:42:23 +00:00
nns: use MillisecondsInSecond constant where appropriate
This commit is contained in:
parent
d8e0a02a86
commit
14c9858df2
1 changed files with 4 additions and 2 deletions
|
@ -64,8 +64,10 @@ const (
|
||||||
const (
|
const (
|
||||||
// defaultRegisterPrice is the default price for new domain registration.
|
// defaultRegisterPrice is the default price for new domain registration.
|
||||||
defaultRegisterPrice = 10_0000_0000
|
defaultRegisterPrice = 10_0000_0000
|
||||||
|
// millisecondsInSecond is the amount of milliseconds per second.
|
||||||
|
millisecondsInSecond = 1000
|
||||||
// millisecondsInYear is amount of milliseconds per year.
|
// millisecondsInYear is amount of milliseconds per year.
|
||||||
millisecondsInYear = 365 * 24 * 3600 * 1000
|
millisecondsInYear = 365 * 24 * 3600 * millisecondsInSecond
|
||||||
)
|
)
|
||||||
|
|
||||||
// RecordState is a type that registered entities are saved to.
|
// RecordState is a type that registered entities are saved to.
|
||||||
|
@ -327,7 +329,7 @@ func Register(name string, owner interop.Hash160, email string, refresh, retry,
|
||||||
ns := NameState{
|
ns := NameState{
|
||||||
Owner: owner,
|
Owner: owner,
|
||||||
Name: name,
|
Name: name,
|
||||||
Expiration: runtime.GetTime() + expire*1000,
|
Expiration: runtime.GetTime() + expire*millisecondsInSecond,
|
||||||
}
|
}
|
||||||
putNameStateWithKey(ctx, tokenKey, ns)
|
putNameStateWithKey(ctx, tokenKey, ns)
|
||||||
putSoaRecord(ctx, name, email, refresh, retry, expire, ttl)
|
putSoaRecord(ctx, name, email, refresh, retry, expire, ttl)
|
||||||
|
|
Loading…
Reference in a new issue