diff options
Diffstat (limited to 'core/vm/oracle_contracts.go')
-rw-r--r-- | core/vm/oracle_contracts.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/vm/oracle_contracts.go b/core/vm/oracle_contracts.go index b36a05d15..c82fed3cf 100644 --- a/core/vm/oracle_contracts.go +++ b/core/vm/oracle_contracts.go @@ -2607,11 +2607,17 @@ func (g *GovernanceContract) transferOwnership(newOwner common.Address) ([]byte, if g.contract.Caller() != g.state.Owner() { return nil, errExecutionReverted } + if newOwner == (common.Address{}) { + return nil, errExecutionReverted + } g.state.SetOwner(newOwner) return nil, nil } func (g *GovernanceContract) transferNodeOwnership(newOwner common.Address) ([]byte, error) { + if newOwner == (common.Address{}) { + return nil, errExecutionReverted + } caller := g.contract.Caller() offset := g.state.NodesOffsetByAddress(caller) |