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: Martin Holst Swende <martin@swende.se>
This commit is contained in:
parent
8a24b56331
commit
9e59474e46
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue