mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-22 09:29:38 +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 (
|
||||
// defaultRegisterPrice is the default price for new domain registration.
|
||||
defaultRegisterPrice = 10_0000_0000
|
||||
// millisecondsInSecond is the amount of milliseconds per second.
|
||||
millisecondsInSecond = 1000
|
||||
// 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.
|
||||
|
@ -327,7 +329,7 @@ func Register(name string, owner interop.Hash160, email string, refresh, retry,
|
|||
ns := NameState{
|
||||
Owner: owner,
|
||||
Name: name,
|
||||
Expiration: runtime.GetTime() + expire*1000,
|
||||
Expiration: runtime.GetTime() + expire*millisecondsInSecond,
|
||||
}
|
||||
putNameStateWithKey(ctx, tokenKey, ns)
|
||||
putSoaRecord(ctx, name, email, refresh, retry, expire, ttl)
|
||||
|
|
Loading…
Reference in a new issue