Skip to content

Commit

Permalink
miner: fail early if core.NewBlockChain fails (#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 committed Nov 2, 2022
1 parent a2a144c commit 24f08ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion miner/worker_test.go
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 24f08ec

Please sign in to comment.