未验证 提交 9e59474e 编写于 作者: S Shihao Xia 提交者: 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: NMartin Holst Swende <martin@swende.se>
上级 8a24b563
......@@ -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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册