mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-06 19:06:42 +01:00
Sync ForgerCommitment and use it in coord
Previously the coordinator was erroneously using Slot.BatchesLen to determine when anyone can forge. The correct behaviour is implmenented with the boolean flag `ForgerCommitment`, that is set to true only when there's a batch before the deadline within a slot. Delete Slot.BatchesLen, and the synchronization code of this value from the Synchronizer, as this is not needed
This commit is contained in:
@@ -26,13 +26,14 @@ type BidCoordinator struct {
|
||||
|
||||
// Slot contains relevant information of a slot
|
||||
type Slot struct {
|
||||
SlotNum int64
|
||||
DefaultSlotBid *big.Int
|
||||
StartBlock int64
|
||||
EndBlock int64
|
||||
BatchesLen int
|
||||
BidValue *big.Int
|
||||
BootCoord bool
|
||||
SlotNum int64
|
||||
DefaultSlotBid *big.Int
|
||||
StartBlock int64
|
||||
EndBlock int64
|
||||
ForgerCommitment bool
|
||||
// BatchesLen int
|
||||
BidValue *big.Int
|
||||
BootCoord bool
|
||||
// Bidder, Forer and URL correspond to the winner of the slot (which is
|
||||
// not always the highest bidder). These are the values of the
|
||||
// coordinator that is able to forge exclusively before the deadline.
|
||||
|
||||
Reference in New Issue
Block a user