Skip to content

Commit

Permalink
miner: fail early if core.NewBlockChain fails (ethereum#26079)
Browse files Browse the repository at this point in the history
don't ignore errors returned by core.NewBlockChain when initializing tests
  • Loading branch information
roberto-bayardo authored and shekhirin committed Jun 6, 2023
1 parent e3b9cd8 commit 51fe091
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion miner/worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ func newTestWorkerBackend(t *testing.T, chainConfig *params.ChainConfig, engine
default:
t.Fatalf("unexpected consensus engine type: %T", engine)
}
chain, _ := core.NewBlockChain(db, &core.CacheConfig{TrieDirtyDisabled: true}, gspec, nil, engine, vm.Config{}, nil, nil)
chain, err := core.NewBlockChain(db, &core.CacheConfig{TrieDirtyDisabled: true}, gspec, nil, engine, vm.Config{}, nil, nil)
if err != nil {
t.Fatalf("core.NewBlockChain failed: %v", err)
}
txpool := txpool.NewTxPool(testTxPoolConfig, chainConfig, chain)

// Generate a small n-block chain and an uncle block for it
Expand Down

0 comments on commit 51fe091

Please sign in to comment.