Skip to content

Commit

Permalink
core/rawdb: close database in test to avoid goroutine leak (ethereum#…
Browse files Browse the repository at this point in the history
…23287)

* add db close to avoid goroutine leak

* core/rawdb: move close to defer

Co-authored-by: Martin Holst Swende <martin@swende.se>
  • Loading branch information
charlesxsh and holiman authored Aug 8, 2021
1 parent 8a24b56 commit 9e59474
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/rawdb/accessors_chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ func TestAncientStorage(t *testing.T) {
if err != nil {
t.Fatalf("failed to create database with ancient backend")
}
defer db.Close()
// Create a test block
block := types.NewBlockWithHeader(&types.Header{
Number: big.NewInt(0),
Expand Down

0 comments on commit 9e59474

Please sign in to comment.