From b14eebcdf30666c1ece65b0ceee702e039a430b5 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Wed, 27 Nov 2024 13:12:14 +0300 Subject: [PATCH] test Signed-off-by: Anna Shaleva --- pkg/services/blockfetcher/blockfetcher.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/services/blockfetcher/blockfetcher.go b/pkg/services/blockfetcher/blockfetcher.go index 3b815dcdb..2e919319f 100644 --- a/pkg/services/blockfetcher/blockfetcher.go +++ b/pkg/services/blockfetcher/blockfetcher.go @@ -222,7 +222,14 @@ func (bfs *Service) blockDownloader() { select { case <-bfs.ctx.Done(): return - case bfs.blocksCh <- b: + default: + err := bfs.enqueueBlock(b) + if err != nil { + bfs.log.Error("failed to enqueue block", zap.Uint32("index", b.Index), zap.Error(err)) + bfs.stopService(true) + return + } + //case bfs.blocksCh <- b: } } }