Skip to content

Commit

Permalink
core: stop blockchains in tests after use
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman committed Oct 4, 2022
1 parent df3ddc0 commit fc65faa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/blockchain_test.go
Expand Up @@ -681,7 +681,7 @@ func TestHeadersInsertNonceError(t *testing.T) { testInsertNonceError(t, false)
func TestBlocksInsertNonceError(t *testing.T) { testInsertNonceError(t, true) }

func testInsertNonceError(t *testing.T, full bool) {
for i := 1; i < 25 && !t.Failed(); i++ {
doTest := func(i int) {
// Create a pristine chain and database
genDb, _, blockchain, err := newCanonical(ethash.NewFaker(), 0, full)
if err != nil {
Expand Down Expand Up @@ -730,6 +730,9 @@ func testInsertNonceError(t *testing.T, full bool) {
}
}
}
for i := 1; i < 25 && !t.Failed(); i++ {
doTest(i)
}
}

// Tests that fast importing a block chain produces the same chain data as the
Expand Down

0 comments on commit fc65faa

Please sign in to comment.