From 0299a2fd1a7db2efc664dc1b51009ca76a84fe85 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Tue, 12 Nov 2024 22:39:49 +0300 Subject: [PATCH] renew comments --- contracts/nns/contract.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/contracts/nns/contract.go b/contracts/nns/contract.go index 7be0b46a..d2a8ef79 100644 --- a/contracts/nns/contract.go +++ b/contracts/nns/contract.go @@ -463,12 +463,15 @@ func saveDomain(ctx storage.Context, name, email string, refresh, retry, expire, putSoaRecord(ctx, name, email, refresh, retry, expire, ttl) } -// RenewDefault increases domain expiration date for 1 year. +// RenewDefault increases domain expiration date for 1 year and returns +// the new expriration timestamp. func RenewDefault(name string) int64 { return Renew(name, 1) } -// Renew increases domain expiration date up to the specified amount of years. +// Renew increases domain expiration date up to the specified amount of years +// (from 1 to 10, can't renew for more than 10 years). Returns new expiration +// timestamp. func Renew(name string, years int) int64 { if years < 1 || years > 10 { panic("invalid renewal period value")