From e5960465a72b97bf3218ba5b85ab2cb3d6f4b1c8 Mon Sep 17 00:00:00 2001 From: zava Date: Wed, 29 Nov 2017 15:46:58 -0300 Subject: [PATCH] owner can't be set as heir --- contracts/ownership/Inheritable.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/ownership/Inheritable.sol b/contracts/ownership/Inheritable.sol index be28e000f..cce710d1f 100644 --- a/contracts/ownership/Inheritable.sol +++ b/contracts/ownership/Inheritable.sol @@ -45,6 +45,7 @@ contract Inheritable is Ownable { } function setHeir(address newHeir) public onlyOwner { + require(newHeir != owner); heartbeat(); HeirChanged(owner, newHeir); heir = newHeir;