From 616e33f290c8724b417fc251d8d3244b3318e217 Mon Sep 17 00:00:00 2001 From: Shivam Sharma Date: Tue, 4 Jul 2023 16:50:05 +0530 Subject: [PATCH] fix : TestBeaconSync66 --- core/txpool/txpool.go | 2 ++ eth/downloader/downloader_test.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/txpool/txpool.go b/core/txpool/txpool.go index 0085ab5905..70d1761f96 100644 --- a/core/txpool/txpool.go +++ b/core/txpool/txpool.go @@ -1267,7 +1267,9 @@ func (pool *TxPool) addTxs(txs []*types.Transaction, local, sync bool) []error { for errs[nilSlot] != nil { nilSlot++ } + errs[nilSlot] = err + nilSlot++ } // Reorg the pool internals if needed and return diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index 7966640d09..4685e85379 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -63,7 +63,7 @@ func newTester(t *testing.T) *downloadTester { } // newTester creates a new downloader test mocker. -func newTesterWithNotification(t *testing.T, _ func()) *downloadTester { +func newTesterWithNotification(t *testing.T, success func()) *downloadTester { t.Helper() freezer := t.TempDir() @@ -95,7 +95,7 @@ func newTesterWithNotification(t *testing.T, _ func()) *downloadTester { } //nolint: staticcheck - tester.downloader = New(0, db, new(event.TypeMux), tester.chain, nil, tester.dropPeer, nil, whitelist.NewService(10)) + tester.downloader = New(0, db, new(event.TypeMux), tester.chain, nil, tester.dropPeer, success, whitelist.NewService(10)) return tester }