owner can't be set as heir
This commit is contained in:
committed by
Alejandro Santander
parent
5716492ebd
commit
e5960465a7
@ -45,6 +45,7 @@ contract Inheritable is Ownable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setHeir(address newHeir) public onlyOwner {
|
function setHeir(address newHeir) public onlyOwner {
|
||||||
|
require(newHeir != owner);
|
||||||
heartbeat();
|
heartbeat();
|
||||||
HeirChanged(owner, newHeir);
|
HeirChanged(owner, newHeir);
|
||||||
heir = newHeir;
|
heir = newHeir;
|
||||||
|
|||||||
Reference in New Issue
Block a user