Skip to content

Commit

Permalink
renew comments
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-khimov committed Nov 12, 2024
1 parent 71f07c7 commit 0299a2f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions contracts/nns/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 0299a2f

Please sign in to comment.