@@ -217,7 +217,7 @@ type BlockChain struct {
217217 lastWrite uint64 // Last block when the state was flushed
218218 flushInterval atomic.Int64 // Time interval (processing time) after which to flush a state
219219 triedb * triedb.Database // The database handler for maintaining trie nodes.
220- stateDb * state.CachingDB // State database to reuse between imports (contains state cache)
220+ statedb * state.CachingDB // State database to reuse between imports (contains state cache)
221221 txIndexer * txIndexer // Transaction indexer, might be nil if not enabled
222222
223223 hc * HeaderChain
@@ -308,7 +308,7 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis
308308 return nil , err
309309 }
310310 bc .flushInterval .Store (int64 (cacheConfig .TrieTimeLimit ))
311- bc .stateDb = state .NewDatabase (bc .triedb , nil )
311+ bc .statedb = state .NewDatabase (bc .triedb , nil )
312312 bc .validator = NewBlockValidator (chainConfig , bc )
313313 bc .prefetcher = newStatePrefetcher (chainConfig , bc .hc )
314314 bc .processor = NewStateProcessor (chainConfig , bc .hc )
@@ -448,7 +448,7 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis
448448 bc .snaps , _ = snapshot .New (snapconfig , bc .db , bc .triedb , head .Root )
449449
450450 // Re-initialize the state database with snapshot
451- bc .stateDb = state .NewDatabase (bc .triedb , bc .snaps )
451+ bc .statedb = state .NewDatabase (bc .triedb , bc .snaps )
452452 }
453453
454454 // Rewind the chain in case of an incompatible config upgrade.
@@ -1768,7 +1768,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error)
17681768 if parent == nil {
17691769 parent = bc .GetHeader (block .ParentHash (), block .NumberU64 ()- 1 )
17701770 }
1771- statedb , err := state .New (parent .Root , bc .stateDb )
1771+ statedb , err := state .New (parent .Root , bc .statedb )
17721772 if err != nil {
17731773 return it .index , err
17741774 }
@@ -1794,7 +1794,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error)
17941794 var followupInterrupt atomic.Bool
17951795 if ! bc .cacheConfig .TrieCleanNoPrefetch {
17961796 if followup , err := it .peek (); followup != nil && err == nil {
1797- throwaway , _ := state .New (parent .Root , bc .stateDb )
1797+ throwaway , _ := state .New (parent .Root , bc .statedb )
17981798
17991799 go func (start time.Time , followup * types.Block , throwaway * state.StateDB ) {
18001800 // Disable tracing for prefetcher executions.
0 commit comments