forked from cerc-io/plugeth
all: cleanup the APIs for initializing genesis (#25473)
* all: polish tests * core: apply feedback from Guillaume * core: fix comment
This commit is contained in:
@@ -248,7 +248,7 @@ func generateTestChain() []*types.Block {
|
||||
g.AddTx(testTx2)
|
||||
}
|
||||
}
|
||||
gblock := genesis.ToBlock(db)
|
||||
gblock := genesis.MustCommit(db)
|
||||
engine := ethash.NewFaker()
|
||||
blocks, _ := core.GenerateChain(genesis.Config, gblock, engine, db, 2, generate)
|
||||
blocks = append([]*types.Block{gblock}, blocks...)
|
||||
|
||||
@@ -83,7 +83,7 @@ func generateTestChain() (*core.Genesis, []*types.Block) {
|
||||
g.OffsetTime(5)
|
||||
g.SetExtra([]byte("test"))
|
||||
}
|
||||
gblock := genesis.ToBlock(db)
|
||||
gblock := genesis.MustCommit(db)
|
||||
engine := ethash.NewFaker()
|
||||
blocks, _ := core.GenerateChain(config, gblock, engine, db, 1, generate)
|
||||
blocks = append([]*types.Block{gblock}, blocks...)
|
||||
|
||||
Reference in New Issue
Block a user