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
2 people authored and jagdeep sidhu committed Aug 15, 2021
1 parent 71d553b commit 1d37b6f
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 1d37b6f

Please sign in to comment.