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 <[email protected]>
  • Loading branch information
2 people authored and atif-konasl committed Oct 15, 2021
1 parent e61b439 commit 26c4f32
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 26c4f32

Please sign in to comment.