mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
rename to authority
This commit is contained in:
parent
d63f36c1ed
commit
2fcbfa4045
1 changed files with 4 additions and 4 deletions
|
|
@ -79,8 +79,8 @@ type SetCodeAuthorization struct {
|
||||||
S uint256.Int `json:"s" gencodec:"required"`
|
S uint256.Int `json:"s" gencodec:"required"`
|
||||||
|
|
||||||
// caches
|
// caches
|
||||||
hash atomic.Pointer[common.Hash]
|
hash atomic.Pointer[common.Hash]
|
||||||
from atomic.Pointer[common.Address]
|
authority atomic.Pointer[common.Address]
|
||||||
}
|
}
|
||||||
|
|
||||||
// field type overrides for gencodec
|
// field type overrides for gencodec
|
||||||
|
|
@ -125,7 +125,7 @@ func (a *SetCodeAuthorization) sigHash() common.Hash {
|
||||||
|
|
||||||
// Authority recovers the authorizing account of an authorization.
|
// Authority recovers the authorizing account of an authorization.
|
||||||
func (a *SetCodeAuthorization) Authority() (common.Address, error) {
|
func (a *SetCodeAuthorization) Authority() (common.Address, error) {
|
||||||
if addr := a.from.Load(); addr != nil {
|
if addr := a.authority.Load(); addr != nil {
|
||||||
return *addr, nil
|
return *addr, nil
|
||||||
}
|
}
|
||||||
sighash := a.sigHash()
|
sighash := a.sigHash()
|
||||||
|
|
@ -147,7 +147,7 @@ func (a *SetCodeAuthorization) Authority() (common.Address, error) {
|
||||||
}
|
}
|
||||||
var addr common.Address
|
var addr common.Address
|
||||||
copy(addr[:], crypto.Keccak256(pub[1:])[12:])
|
copy(addr[:], crypto.Keccak256(pub[1:])[12:])
|
||||||
a.from.Store(&addr)
|
a.authority.Store(&addr)
|
||||||
return addr, nil
|
return addr, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue