change release function to ensure block time is greater than release

change releaseDelay to using days as years is deprecated in solidity
This commit is contained in:
Barry Gitarts 2018-08-17 18:09:18 -04:00
parent 79e3e0b379
commit 66e12a1258
1 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ contract ENSSubdomainRegistry is Controlled {
PublicResolver public resolver; PublicResolver public resolver;
address public parentRegistry; address public parentRegistry;
uint256 public releaseDelay = 1 years; uint256 public releaseDelay = 365 days;
mapping (bytes32 => Domain) public domains; mapping (bytes32 => Domain) public domains;
mapping (bytes32 => Account) public accounts; mapping (bytes32 => Account) public accounts;
@ -134,7 +134,7 @@ contract ENSSubdomainRegistry is Controlled {
require(account.creationTime > 0); require(account.creationTime > 0);
if (isDomainController) { if (isDomainController) {
require(msg.sender == ens.owner(subdomainHash)); require(msg.sender == ens.owner(subdomainHash));
require(account.creationTime + releaseDelay >= block.timestamp); require(block.timestamp >= account.creationTime + releaseDelay);
ens.setSubnodeOwner(_domainHash, _userHash, address(this)); ens.setSubnodeOwner(_domainHash, _userHash, address(this));
ens.setResolver(subdomainHash, address(0)); ens.setResolver(subdomainHash, address(0));
ens.setOwner(subdomainHash, address(0)); ens.setOwner(subdomainHash, address(0));