nns: Allow 2-byte domain names #73
2 changed files with 11 additions and 1 deletions
|
@ -52,7 +52,7 @@ const (
|
|||
// maxDomainNameFragmentLength is the maximum length of the domain name fragment.
|
||||
maxDomainNameFragmentLength = 63
|
||||
// minDomainNameLength is minimum domain length.
|
||||
minDomainNameLength = 3
|
||||
minDomainNameLength = 2
|
||||
// maxDomainNameLength is maximum domain length.
|
||||
maxDomainNameLength = 255
|
||||
// maxTXTRecordLength is the maximum length of the TXT domain record.
|
||||
|
|
|
@ -58,6 +58,16 @@ func TestNNSRegisterTLD(t *testing.T) {
|
|||
"com", acc.ScriptHash(),
|
||||
"email@frostfs.info", refresh, retry, expire, ttl)
|
||||
|
||||
t.Run("size checks", func(t *testing.T) {
|
||||
c.Invoke(t, true, "register",
|
||||
"ns", c.CommitteeHash,
|
||||
"email@frostfs.info", refresh, retry, expire, ttl)
|
||||
|
||||
c.InvokeFail(t, "invalid domain name format", "register",
|
||||
"x", c.CommitteeHash,
|
||||
"email@frostfs.info", refresh, retry, expire, ttl)
|
||||
})
|
||||
|
||||
c.Invoke(t, true, "register",
|
||||
"com", c.CommitteeHash,
|
||||
"email@frostfs.info", refresh, retry, expire, ttl)
|
||||
|
|
Loading…
Reference in a new issue