parent
017a6b9bc1
commit
baf24d1c66
1 changed files with 6 additions and 1 deletions
|
@ -448,7 +448,12 @@ func getTokenKey(tokenID []byte) []byte {
|
||||||
// getNameState returns domain name state by the specified tokenID.
|
// getNameState returns domain name state by the specified tokenID.
|
||||||
func getNameState(ctx storage.Context, tokenID []byte) NameState {
|
func getNameState(ctx storage.Context, tokenID []byte) NameState {
|
||||||
tokenKey := getTokenKey(tokenID)
|
tokenKey := getTokenKey(tokenID)
|
||||||
return getNameStateWithKey(ctx, tokenKey)
|
ns := getNameStateWithKey(ctx, tokenKey)
|
||||||
|
fragments := std.StringSplit(string(tokenID), ".")
|
||||||
|
if parentExpired(ctx, 1, fragments) {
|
||||||
|
panic("parent domain has expired")
|
||||||
|
}
|
||||||
|
return ns
|
||||||
}
|
}
|
||||||
|
|
||||||
// getNameStateWithKey returns domain name state by the specified token key.
|
// getNameStateWithKey returns domain name state by the specified token key.
|
||||||
|
|
Loading…
Reference in a new issue