From 3241e7762e32c0386a74cff4c645b8d2dc281456 Mon Sep 17 00:00:00 2001 From: Ferran Borreguero Date: Mon, 2 Oct 2023 15:53:59 +0200 Subject: [PATCH] Avoid deadlock --- suave/backends/local_store_backend.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/suave/backends/local_store_backend.go b/suave/backends/local_store_backend.go index 3e1727e9d..6ed97cd7b 100644 --- a/suave/backends/local_store_backend.go +++ b/suave/backends/local_store_backend.go @@ -102,11 +102,10 @@ func (l *LocalConfidentialStore) FetchBidsByProtocolAndBlock(blockNumber uint64, res := []suave.Bid{} for _, id := range bidIDs { - bid, err := l.FetchBidById(id) - if err != nil { - continue + bid, found := l.bids[id] + if found { + res = append(res, bid) } - res = append(res, bid) } return res