arnaucube
arnaucube/hermez-nodePublic Self-hosted repository
hermez-node/common/slot.go
common/slot.goRaw
 1package common
 2
 3import (
 4	"math/big"
 5)
 6
 7// Slot represents a slot of the Hermez network
 8// WARNING: this is strongly based on the previous implementation, once the new spec is done, this may change a lot.
 9type Slot struct {
10	SlotNum       SlotNum
11	StartingBlock uint64      // Ethereum block in which the slot starts
12	Forger        Coordinator // Current Operaror winner information
13}
14
15// SlotMinPrice is the policy of minimum prices for strt bidding in the slots
16type SlotMinPrice struct {
17	EthBlockNum uint64 // Etherum block in which the min price was updated
18	MinPrices   [6]big.Int
19}
20
21// GetMinPrice returns the minimum bid to enter the auction for a specific slot
22func (smp *SlotMinPrice) GetMinPrice(slotNum SlotNum) *big.Int {
23	// TODO
24	return nil
25}
26
27// SlotNum identifies a slot
28type SlotNum uint32