Fix next forgers when no bids

This commit is contained in:
Arnau B
2020-12-29 16:55:26 +01:00
parent 890b94a41a
commit d3c703ca75

View File

@@ -119,7 +119,7 @@ func (a *API) getNextForgers(lastBlock common.Block, currentSlot, lastClosedSlot
// currentSlot and lastClosedSlot included // currentSlot and lastClosedSlot included
limit := uint(lastClosedSlot - currentSlot + 1) limit := uint(lastClosedSlot - currentSlot + 1)
bids, _, err := a.h.GetBestBidsAPI(&currentSlot, &lastClosedSlot, nil, &limit, "ASC") bids, _, err := a.h.GetBestBidsAPI(&currentSlot, &lastClosedSlot, nil, &limit, "ASC")
if err != nil { if err != nil && tracerr.Unwrap(err) != sql.ErrNoRows {
return nil, tracerr.Wrap(err) return nil, tracerr.Wrap(err)
} }
nextForgers := []NextForger{} nextForgers := []NextForger{}