ソースを参照

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

ucwong 5 年 前
コミット
f98cabad7c
1 ファイル変更1 行追加0 行削除
  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: