@@ -47,9 +47,9 @@ import (
47
47
"github.com/ethereum/go-ethereum/metrics"
48
48
"github.com/ethereum/go-ethereum/params"
49
49
"github.com/ethereum/go-ethereum/rlp"
50
- "github.com/ethereum/go-ethereum/trie "
51
- "github.com/ethereum/go-ethereum/trie/ triedb/hashdb"
52
- "github.com/ethereum/go-ethereum/trie/ triedb/pathdb"
50
+ "github.com/ethereum/go-ethereum/triedb "
51
+ "github.com/ethereum/go-ethereum/triedb/hashdb"
52
+ "github.com/ethereum/go-ethereum/triedb/pathdb"
53
53
"golang.org/x/exp/slices"
54
54
)
55
55
@@ -149,8 +149,8 @@ type CacheConfig struct {
149
149
}
150
150
151
151
// triedbConfig derives the configures for trie database.
152
- func (c * CacheConfig ) triedbConfig () * trie .Config {
153
- config := & trie .Config {Preimages : c .Preimages }
152
+ func (c * CacheConfig ) triedbConfig () * triedb .Config {
153
+ config := & triedb .Config {Preimages : c .Preimages }
154
154
if c .StateScheme == rawdb .HashScheme {
155
155
config .HashDB = & hashdb.Config {
156
156
CleanCacheSize : c .TrieCleanLimit * 1024 * 1024 ,
@@ -235,7 +235,7 @@ type BlockChain struct {
235
235
gcproc time.Duration // Accumulates canonical block processing for trie dumping
236
236
lastWrite uint64 // Last block when the state was flushed
237
237
flushInterval atomic.Int64 // Time interval (processing time) after which to flush a state
238
- triedb * trie .Database // The database handler for maintaining trie nodes.
238
+ triedb * triedb .Database // The database handler for maintaining trie nodes.
239
239
stateCache state.Database // State database to reuse between imports (contains state cache)
240
240
txIndexer * txIndexer // Transaction indexer, might be nil if not enabled
241
241
@@ -289,7 +289,7 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis
289
289
cacheConfig = defaultCacheConfig
290
290
}
291
291
// Open trie database with provided config
292
- triedb := trie .NewDatabase (db , cacheConfig .triedbConfig ())
292
+ triedb := triedb .NewDatabase (db , cacheConfig .triedbConfig ())
293
293
var logger BlockchainLogger
294
294
if vmConfig .Tracer != nil {
295
295
l , ok := vmConfig .Tracer .(BlockchainLogger )
@@ -299,6 +299,7 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis
299
299
log .Warn ("only extended tracers are supported for live mode" )
300
300
}
301
301
}
302
+
302
303
// Setup the genesis block, commit the provided genesis specification
303
304
// to database if the genesis block is not present yet, or load the
304
305
// stored one from database.
0 commit comments