Unverified Commit 9e59474e authored by Shihao Xia's avatar Shihao Xia Committed by GitHub

core/rawdb: close database in test to avoid goroutine leak (#23287)

* add db close to avoid goroutine leak

* core/rawdb: move close to defer
Co-authored-by: 's avatarMartin Holst Swende <martin@swende.se>
No related merge requests found
......@@ -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),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment