From 20a092fb9fac68a1835b7a98e2e3a0e96a138ef6 Mon Sep 17 00:00:00 2001 From: meowsbits <45600330+meowsbits@users.noreply.github.com> Date: Wed, 18 Mar 2020 06:55:30 -0500 Subject: [PATCH] core/rawdb: fix freezer table test error check Fixes: Condition is always 'false' because 'err' is always 'nil' --- core/rawdb/freezer_table_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/rawdb/freezer_table_test.go b/core/rawdb/freezer_table_test.go index e4a22b376..dd1ff744a 100644 --- a/core/rawdb/freezer_table_test.go +++ b/core/rawdb/freezer_table_test.go @@ -196,10 +196,8 @@ func TestFreezerRepairDanglingHeadLarge(t *testing.T) { f.Append(uint64(x), data) } // The last item should be there - if _, err = f.Retrieve(f.items - 1); err == nil { - if err != nil { - t.Fatal(err) - } + if _, err = f.Retrieve(f.items - 1); err != nil { + t.Fatal(err) } f.Close() }