mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 11:26:44 +01:00
Fix next forgers when no bids
This commit is contained in:
@@ -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(¤tSlot, &lastClosedSlot, nil, &limit, "ASC")
|
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)
|
return nil, tracerr.Wrap(err)
|
||||||
}
|
}
|
||||||
nextForgers := []NextForger{}
|
nextForgers := []NextForger{}
|
||||||
|
|||||||
Reference in New Issue
Block a user