@@ -37,7 +37,8 @@ import (
37
37
"github.com/ethereum/go-ethereum/params"
38
38
"github.com/ethereum/go-ethereum/rlp"
39
39
"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"
41
42
"github.com/holiman/uint256"
42
43
)
43
44
@@ -127,9 +128,9 @@ func (ga *GenesisAlloc) hash(isVerkle bool) (common.Hash, error) {
127
128
// If a genesis-time verkle trie is requested, create a trie config
128
129
// with the verkle trie enabled so that the tree can be initialized
129
130
// as such.
130
- var config * trie .Config
131
+ var config * triedb .Config
131
132
if isVerkle {
132
- config = & trie .Config {
133
+ config = & triedb .Config {
133
134
PathDB : pathdb .Defaults ,
134
135
IsVerkle : true ,
135
136
}
@@ -157,7 +158,7 @@ func (ga *GenesisAlloc) hash(isVerkle bool) (common.Hash, error) {
157
158
// flush is very similar with hash, but the main difference is all the generated
158
159
// states will be persisted into the given database. Also, the genesis state
159
160
// 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 {
161
162
statedb , err := state .New (types .EmptyRootHash , state .NewDatabaseWithNodeDB (db , triedb ), nil )
162
163
if err != nil {
163
164
return err
@@ -272,11 +273,11 @@ type ChainOverrides struct {
272
273
// error is a *params.ConfigCompatError and the new, unwritten config is returned.
273
274
//
274
275
// 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 ) {
276
277
return SetupGenesisBlockWithOverride (db , triedb , genesis , nil )
277
278
}
278
279
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 ) {
280
281
if genesis != nil && genesis .Config == nil {
281
282
return params .AllEthashProtocolChanges , common.Hash {}, errGenesisNoConfig
282
283
}
@@ -491,7 +492,7 @@ func (g *Genesis) ToBlock() *types.Block {
491
492
492
493
// Commit writes the block and state of a genesis specification to the database.
493
494
// 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 ) {
495
496
block := g .ToBlock ()
496
497
if block .Number ().Sign () != 0 {
497
498
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
525
526
526
527
// MustCommit writes the genesis block and state to db, panicking on error.
527
528
// 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 {
529
530
block , err := g .Commit (db , triedb )
530
531
if err != nil {
531
532
panic (err )
0 commit comments