From 58e4311e632d09b16e2fac8daa2871b90984b458 Mon Sep 17 00:00:00 2001 From: Shivam Sharma Date: Fri, 21 Jan 2022 13:03:02 +0000 Subject: [PATCH] Minor change --- core/blockchain_bor_test.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/core/blockchain_bor_test.go b/core/blockchain_bor_test.go index a30627675d..52f4f7cd83 100644 --- a/core/blockchain_bor_test.go +++ b/core/blockchain_bor_test.go @@ -59,32 +59,28 @@ func TestChain2HeadEvent(t *testing.T) { Removed []common.Hash } - // To use in fatal log, indicates the readEvent which failed the test. - i := 0 - readEvent := func(expect *eventTest) { select { case ev := <-chain2HeadCh: - i++ if ev.Type != expect.Type { - t.Fatalf("%d : type mismatch", i) + t.Fatal("Type mismatch") } if len(ev.NewChain) != len(expect.Added) { - t.Fatalf("%d : Newchain and Added Array Size don't match", i) + t.Fatal("Newchain and Added Array Size don't match") } if len(ev.OldChain) != len(expect.Removed) { - t.Fatalf("%d : Oldchain and Removed Array Size don't match", i) + t.Fatal("Oldchain and Removed Array Size don't match") } for j := 0; j < len(ev.OldChain); j++ { if ev.OldChain[j].Hash() != expect.Removed[j] { - t.Fatalf("%d : Oldchain hashes Does Not Match", i) + t.Fatal("Oldchain hashes Do Not Match") } } for j := 0; j < len(ev.NewChain); j++ { if ev.NewChain[j].Hash() != expect.Added[j] { - t.Fatalf("%d : Newchain hashes Does Not Match", i) + t.Fatal("Newchain hashes Do Not Match") } } case <-time.After(2 * time.Second):