@@ -37,7 +37,8 @@ import (
3737 "github.com/ethereum/go-ethereum/params"
3838 "github.com/ethereum/go-ethereum/rlp"
3939 "github.com/ethereum/go-ethereum/trie"
40- "github.com/ethereum/go-ethereum/trie/triedb/pathdb"
40+ "github.com/ethereum/go-ethereum/triedb"
41+ "github.com/ethereum/go-ethereum/triedb/pathdb"
4142 "github.com/holiman/uint256"
4243)
4344
@@ -127,9 +128,9 @@ func (ga *GenesisAlloc) hash(isVerkle bool) (common.Hash, error) {
127128 // If a genesis-time verkle trie is requested, create a trie config
128129 // with the verkle trie enabled so that the tree can be initialized
129130 // as such.
130- var config * trie .Config
131+ var config * triedb .Config
131132 if isVerkle {
132- config = & trie .Config {
133+ config = & triedb .Config {
133134 PathDB : pathdb .Defaults ,
134135 IsVerkle : true ,
135136 }
@@ -157,7 +158,7 @@ func (ga *GenesisAlloc) hash(isVerkle bool) (common.Hash, error) {
157158// flush is very similar with hash, but the main difference is all the generated
158159// states will be persisted into the given database. Also, the genesis state
159160// specification will be flushed as well.
160- func (ga * GenesisAlloc ) flush (db ethdb.Database , triedb * trie .Database , blockhash common.Hash ) error {
161+ func (ga * GenesisAlloc ) flush (db ethdb.Database , triedb * triedb .Database , blockhash common.Hash ) error {
161162 statedb , err := state .New (types .EmptyRootHash , state .NewDatabaseWithNodeDB (db , triedb ), nil )
162163 if err != nil {
163164 return err
@@ -272,11 +273,11 @@ type ChainOverrides struct {
272273// error is a *params.ConfigCompatError and the new, unwritten config is returned.
273274//
274275// The returned chain configuration is never nil.
275- func SetupGenesisBlock (db ethdb.Database , triedb * trie .Database , genesis * Genesis ) (* params.ChainConfig , common.Hash , error ) {
276+ func SetupGenesisBlock (db ethdb.Database , triedb * triedb .Database , genesis * Genesis ) (* params.ChainConfig , common.Hash , error ) {
276277 return SetupGenesisBlockWithOverride (db , triedb , genesis , nil )
277278}
278279
279- func SetupGenesisBlockWithOverride (db ethdb.Database , triedb * trie .Database , genesis * Genesis , overrides * ChainOverrides ) (* params.ChainConfig , common.Hash , error ) {
280+ func SetupGenesisBlockWithOverride (db ethdb.Database , triedb * triedb .Database , genesis * Genesis , overrides * ChainOverrides ) (* params.ChainConfig , common.Hash , error ) {
280281 if genesis != nil && genesis .Config == nil {
281282 return params .AllEthashProtocolChanges , common.Hash {}, errGenesisNoConfig
282283 }
@@ -491,7 +492,7 @@ func (g *Genesis) ToBlock() *types.Block {
491492
492493// Commit writes the block and state of a genesis specification to the database.
493494// The block is committed as the canonical head block.
494- func (g * Genesis ) Commit (db ethdb.Database , triedb * trie .Database ) (* types.Block , error ) {
495+ func (g * Genesis ) Commit (db ethdb.Database , triedb * triedb .Database ) (* types.Block , error ) {
495496 block := g .ToBlock ()
496497 if block .Number ().Sign () != 0 {
497498 return nil , errors .New ("can't commit genesis block with number > 0" )
@@ -525,7 +526,7 @@ func (g *Genesis) Commit(db ethdb.Database, triedb *trie.Database) (*types.Block
525526
526527// MustCommit writes the genesis block and state to db, panicking on error.
527528// The block is committed as the canonical head block.
528- func (g * Genesis ) MustCommit (db ethdb.Database , triedb * trie .Database ) * types.Block {
529+ func (g * Genesis ) MustCommit (db ethdb.Database , triedb * triedb .Database ) * types.Block {
529530 block , err := g .Commit (db , triedb )
530531 if err != nil {
531532 panic (err )
0 commit comments