From 2ba7c036a7d029974471f13add74d644ea489489 Mon Sep 17 00:00:00 2001 From: Manav Darji Date: Tue, 24 May 2022 17:13:49 +0530 Subject: [PATCH] fix tests --- eth/downloader/whitelist/service_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eth/downloader/whitelist/service_test.go b/eth/downloader/whitelist/service_test.go index de1e902e99..79a92da826 100644 --- a/eth/downloader/whitelist/service_test.go +++ b/eth/downloader/whitelist/service_test.go @@ -57,7 +57,8 @@ func TestIsValidChain(t *testing.T) { return nil, nil, nil } - // case2: false fetchHeadersByNumber function provided, should consider the chain as valid + // case2: false fetchHeadersByNumber function provided, should consider the chain as invalid + // and throw `ErrNoRemoteCheckoint` error res, err = s.IsValidChain(nil, falseFetchHeadersByNumber) if err == nil { t.Fatal("expected error, got nil") @@ -67,7 +68,7 @@ func TestIsValidChain(t *testing.T) { t.Fatalf("expected error ErrNoRemoteCheckoint, got %v", err) } - assert.Equal(t, res, true, "expected chain to be valid") + assert.Equal(t, res, false, "expected chain to be invalid") // case3: correct fetchHeadersByNumber function provided, should consider the chain as valid // create a mock function, returning a the required header