Przeglądaj źródła

core: add missing Timer.Stop call in TestLogReorgs (#20870)

ucwong 5 lat temu
rodzic
commit
f98cabad7c
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      core/blockchain_test.go

+ 1 - 0
core/blockchain_test.go

@@ -973,6 +973,7 @@ func TestLogReorgs(t *testing.T) {
 		t.Fatalf("failed to insert forked chain: %v", err)
 	}
 	timeout := time.NewTimer(1 * time.Second)
+	defer timeout.Stop()
 	select {
 	case <-done:
 	case <-timeout.C: