From 66a5950ff3e49edbee47fcd9cfbd897523c2a8ad Mon Sep 17 00:00:00 2001 From: Tuna Date: Tue, 13 Nov 2018 09:55:34 +0700 Subject: [PATCH] fix unit test: remove td test --- core/blockchain_test.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 4dfbd0f01f..b752b9ef8d 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -409,17 +409,6 @@ func testReorg(t *testing.T, first, second []int64, td int64, full bool) { } } } - // Make sure the chain total difficulty is the correct one - want := new(big.Int).Add(blockchain.genesisBlock.Difficulty(), big.NewInt(td)) - if full { - if have := blockchain.GetTdByHash(blockchain.CurrentBlock().Hash()); have.Cmp(want) != 0 { - t.Errorf("total difficulty mismatch: have %v, want %v", have, want) - } - } else { - if have := blockchain.GetTdByHash(blockchain.CurrentHeader().Hash()); have.Cmp(want) != 0 { - t.Errorf("total difficulty mismatch: have %v, want %v", have, want) - } - } } // Tests that the insertion functions detect banned hashes.