Skip to content

Commit 9e59474

Browse files
charlesxshholiman
andauthored
core/rawdb: close database in test to avoid goroutine leak (ethereum#23287)
* add db close to avoid goroutine leak * core/rawdb: move close to defer Co-authored-by: Martin Holst Swende <[email protected]>
1 parent 8a24b56 commit 9e59474

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/rawdb/accessors_chain_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ func TestAncientStorage(t *testing.T) {
444444
if err != nil {
445445
t.Fatalf("failed to create database with ancient backend")
446446
}
447+
defer db.Close()
447448
// Create a test block
448449
block := types.NewBlockWithHeader(&types.Header{
449450
Number: big.NewInt(0),

0 commit comments

Comments
 (0)