all: cleanup the APIs for initializing genesis (#25473)
* all: polish tests * core: apply feedback from Guillaume * core: fix comment
This commit is contained in:
@@ -403,7 +403,7 @@ func TestClique(t *testing.T) {
|
||||
}
|
||||
// Create a pristine blockchain with the genesis injected
|
||||
db := rawdb.NewMemoryDatabase()
|
||||
genesis.Commit(db)
|
||||
genesisBlock := genesis.MustCommit(db)
|
||||
|
||||
// Assemble a chain of headers from the cast votes
|
||||
config := *params.TestChainConfig
|
||||
@@ -414,7 +414,7 @@ func TestClique(t *testing.T) {
|
||||
engine := New(config.Clique, db)
|
||||
engine.fakeDiff = true
|
||||
|
||||
blocks, _ := core.GenerateChain(&config, genesis.ToBlock(db), engine, db, len(tt.votes), func(j int, gen *core.BlockGen) {
|
||||
blocks, _ := core.GenerateChain(&config, genesisBlock, engine, db, len(tt.votes), func(j int, gen *core.BlockGen) {
|
||||
// Cast the vote contained in this block
|
||||
gen.SetCoinbase(accounts.address(tt.votes[j].voted))
|
||||
if tt.votes[j].auth {
|
||||
|
||||
Reference in New Issue
Block a user