From 0f85021cb692553bf315d33c82d0637c65a2f156 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 2 Dec 2024 13:02:47 +0100 Subject: [PATCH] core: style improvement in applyAuthorization --- core/state_transition.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/state_transition.go b/core/state_transition.go index 676ae22d43..223169747b 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -562,9 +562,11 @@ func (st *stateTransition) applyAuthorization(msg *Message, auth *types.Authoriz // If the account already exists in state, refund the new account cost // charged in the intrinsic calculation. - if exists := st.state.Exist(authority); exists { + if st.state.Exist(authority) { st.state.AddRefund(params.CallNewAccountGas - params.TxAuthTupleGas) } + + // Update nonce and account code. st.state.SetNonce(authority, auth.Nonce+1) delegation := types.AddressToDelegation(auth.Address) if auth.Address == (common.Address{}) {