mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
common: remove zero address
This commit is contained in:
parent
48ef8da9f0
commit
f709826b6b
2 changed files with 1 additions and 4 deletions
|
|
@ -45,9 +45,6 @@ var (
|
||||||
hashT = reflect.TypeOf(Hash{})
|
hashT = reflect.TypeOf(Hash{})
|
||||||
addressT = reflect.TypeOf(Address{})
|
addressT = reflect.TypeOf(Address{})
|
||||||
|
|
||||||
// ZeroAddress represents the zero address value.
|
|
||||||
ZeroAddress = Address{}
|
|
||||||
|
|
||||||
// MaxAddress represents the maximum possible address value.
|
// MaxAddress represents the maximum possible address value.
|
||||||
MaxAddress = HexToAddress("0xffffffffffffffffffffffffffffffffffffffff")
|
MaxAddress = HexToAddress("0xffffffffffffffffffffffffffffffffffffffff")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -499,7 +499,7 @@ func (st *stateTransition) execute() (*ExecutionResult, error) {
|
||||||
}
|
}
|
||||||
st.state.SetNonce(authority, auth.Nonce+1)
|
st.state.SetNonce(authority, auth.Nonce+1)
|
||||||
delegation := types.AddressToDelegation(auth.Address)
|
delegation := types.AddressToDelegation(auth.Address)
|
||||||
if auth.Address == common.ZeroAddress {
|
if auth.Address == (common.Address{}) {
|
||||||
// If the delegation is for the zero address, completely clear all
|
// If the delegation is for the zero address, completely clear all
|
||||||
// delegations from the account.
|
// delegations from the account.
|
||||||
delegation = []byte{}
|
delegation = []byte{}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue