mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +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"`
|
||||
|
||||
// caches
|
||||
hash atomic.Pointer[common.Hash]
|
||||
from atomic.Pointer[common.Address]
|
||||
hash atomic.Pointer[common.Hash]
|
||||
authority atomic.Pointer[common.Address]
|
||||
}
|
||||
|
||||
// field type overrides for gencodec
|
||||
|
|
@ -125,7 +125,7 @@ func (a *SetCodeAuthorization) sigHash() common.Hash {
|
|||
|
||||
// Authority recovers the authorizing account of an authorization.
|
||||
func (a *SetCodeAuthorization) Authority() (common.Address, error) {
|
||||
if addr := a.from.Load(); addr != nil {
|
||||
if addr := a.authority.Load(); addr != nil {
|
||||
return *addr, nil
|
||||
}
|
||||
sighash := a.sigHash()
|
||||
|
|
@ -147,7 +147,7 @@ func (a *SetCodeAuthorization) Authority() (common.Address, error) {
|
|||
}
|
||||
var addr common.Address
|
||||
copy(addr[:], crypto.Keccak256(pub[1:])[12:])
|
||||
a.from.Store(&addr)
|
||||
a.authority.Store(&addr)
|
||||
return addr, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue