core: reformat comment

This commit is contained in:
Felix Lange 2024-12-02 14:15:06 +01:00 committed by lightclient
parent 5fccdfbfd3
commit ace3a3f12c
No known key found for this signature in database
GPG key ID: 75C916AFEE20183E

View file

@ -544,8 +544,11 @@ func (st *stateTransition) validateAuthorization(auth *types.Authorization) (aut
if err != nil { if err != nil {
return authority, fmt.Errorf("%w: %v", ErrAuthorizationInvalidSignature, err) return authority, fmt.Errorf("%w: %v", ErrAuthorizationInvalidSignature, err)
} }
// Check the authority account 1) doesn't have code or has exisiting // Check the authority account
// delegation 2) matches the auth's nonce // 1) doesn't have code or has exisiting delegation
// 2) matches the auth's nonce
//
// Note it is added to the access list even if the authorization is invalid.
st.state.AddAddressToAccessList(authority) st.state.AddAddressToAccessList(authority)
code := st.state.GetCode(authority) code := st.state.GetCode(authority)
if _, ok := types.ParseDelegation(code); len(code) != 0 && !ok { if _, ok := types.ParseDelegation(code); len(code) != 0 && !ok {