Fix item_id order in forged l1UserTxs

Also, make sure that all SQL queries that return slices are sorted
This commit is contained in:
Eduard S
2020-12-28 16:42:30 +01:00
parent 88cd43efbd
commit 02c2ee155a
4 changed files with 127 additions and 19 deletions

View File

@@ -318,9 +318,10 @@ func (s *Synchronizer) updateCurrentSlotIfSync(reset bool, firstBatchBlockNum *i
} else if err == nil {
slot.BidValue = bidCoord.BidValue
slot.DefaultSlotBid = bidCoord.DefaultSlotSetBid[slot.SlotNum%6]
// Only if the highest bid value is higher than the
// default slot bid, the bidder is the winner of the
// slot. Otherwise the boot coordinator is the winner.
// Only if the highest bid value is greater/equal than
// the default slot bid, the bidder is the winner of
// the slot. Otherwise the boot coordinator is the
// winner.
if slot.BidValue.Cmp(slot.DefaultSlotBid) >= 0 {
slot.Bidder = bidCoord.Bidder
slot.Forger = bidCoord.Forger