From d3c703ca75360a808bb654dbaa215ed11cb45c8d Mon Sep 17 00:00:00 2001 From: Arnau B Date: Tue, 29 Dec 2020 16:55:26 +0100 Subject: [PATCH] Fix next forgers when no bids --- api/state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/state.go b/api/state.go index af7c1e9..f17812b 100644 --- a/api/state.go +++ b/api/state.go @@ -119,7 +119,7 @@ func (a *API) getNextForgers(lastBlock common.Block, currentSlot, lastClosedSlot // currentSlot and lastClosedSlot included limit := uint(lastClosedSlot - currentSlot + 1) bids, _, err := a.h.GetBestBidsAPI(¤tSlot, &lastClosedSlot, nil, &limit, "ASC") - if err != nil { + if err != nil && tracerr.Unwrap(err) != sql.ErrNoRows { return nil, tracerr.Wrap(err) } nextForgers := []NextForger{}