From 2ce7a06cbc08ec28c633fc236102658eec28a6e0 Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Wed, 4 Mar 2026 07:34:53 -0500 Subject: [PATCH] address more lint errors --- beacon/engine/types.go | 3 ++- core/blockchain.go | 3 ++- core/state/bal_state_transition.go | 9 +++++---- core/state/reader_eip_7928.go | 3 ++- core/types/bal/bal.go | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/beacon/engine/types.go b/beacon/engine/types.go index 2124ac9dd5..a10bd8c77c 100644 --- a/beacon/engine/types.go +++ b/beacon/engine/types.go @@ -18,10 +18,11 @@ package engine import ( "fmt" - "github.com/ethereum/go-ethereum/core/types/bal" "math/big" "slices" + "github.com/ethereum/go-ethereum/core/types/bal" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" diff --git a/core/blockchain.go b/core/blockchain.go index 5376af5068..d88687c245 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -606,6 +606,7 @@ func (bc *BlockChain) processBlockWithAccessList(parentRoot common.Hash, block * var ( startTime = time.Now() procTime time.Duration + statedb *state.StateDB ) useAsyncReads := bc.cfg.BALExecutionMode != BALExecutionModeNoBatchIO @@ -620,7 +621,7 @@ func (bc *BlockChain) processBlockWithAccessList(parentRoot common.Hash, block * if err != nil { return nil, err } - statedb, err := state.NewWithReader(parentRoot, bc.statedb, prefetchReader) + statedb, err = state.NewWithReader(parentRoot, bc.statedb, prefetchReader) if bc.logger != nil && bc.logger.OnBlockStart != nil { bc.logger.OnBlockStart(tracing.BlockEvent{ diff --git a/core/state/bal_state_transition.go b/core/state/bal_state_transition.go index 1208577cc9..f8bf0bf908 100644 --- a/core/state/bal_state_transition.go +++ b/core/state/bal_state_transition.go @@ -1,6 +1,11 @@ package state import ( + "maps" + "sync" + "sync/atomic" + "time" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types/bal" @@ -9,10 +14,6 @@ import ( "github.com/ethereum/go-ethereum/trie/trienode" "github.com/holiman/uint256" "golang.org/x/sync/errgroup" - "maps" - "sync" - "sync/atomic" - "time" ) // BALStateTransition is responsible for performing the state root update diff --git a/core/state/reader_eip_7928.go b/core/state/reader_eip_7928.go index eb66f10992..fb5ba1e64b 100644 --- a/core/state/reader_eip_7928.go +++ b/core/state/reader_eip_7928.go @@ -63,9 +63,10 @@ package state // └─────────────────────────────┘ import ( - "github.com/ethereum/go-ethereum/crypto" "sync" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types/bal" diff --git a/core/types/bal/bal.go b/core/types/bal/bal.go index c1a44b8934..b18c728fc3 100644 --- a/core/types/bal/bal.go +++ b/core/types/bal/bal.go @@ -202,7 +202,7 @@ func newConstructionAccountAccesses() *ConstructionAccountAccesses { } } -// StateDiff contains state mutations occuring over one or more access list +// StateDiff contains state mutations occurring over one or more access list // index. type StateDiff struct { Mutations map[common.Address]*AccountMutations `json:"Mutations,omitempty"`