mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Use int64 for blockNum (like it's sroted in DB)
This commit is contained in:
@@ -13,7 +13,7 @@ const batchNumBytesLen = 4
|
||||
// Batch is a struct that represents Hermez network batch
|
||||
type Batch struct {
|
||||
BatchNum BatchNum `meddler:"batch_num"`
|
||||
EthBlockNum uint64 `meddler:"eth_block_num"` // Ethereum block in which the batch is forged
|
||||
EthBlockNum int64 `meddler:"eth_block_num"` // Ethereum block in which the batch is forged
|
||||
ForgerAddr ethCommon.Address `meddler:"forger_addr"` // TODO: Should this be retrieved via slot reference?
|
||||
CollectedFees map[TokenID]*big.Int `meddler:"fees_collected,json"`
|
||||
StateRoot Hash `meddler:"state_root"`
|
||||
|
||||
@@ -11,5 +11,5 @@ type Bid struct {
|
||||
SlotNum SlotNum `meddler:"slot_num"`
|
||||
ForgerAddr ethCommon.Address `meddler:"forger_addr"` // Coordinator reference
|
||||
BidValue *big.Int `meddler:"bid_value,bigint"`
|
||||
EthBlockNum uint64 `meddler:"eth_block_num"`
|
||||
EthBlockNum int64 `meddler:"eth_block_num"`
|
||||
}
|
||||
|
||||
@@ -8,7 +8,8 @@ import (
|
||||
|
||||
// Block represents of an Ethereum block
|
||||
type Block struct {
|
||||
EthBlockNum uint64 `meddler:"eth_block_num"`
|
||||
EthBlockNum int64 `meddler:"eth_block_num"`
|
||||
Timestamp time.Time `meddler:"timestamp"`
|
||||
Hash ethCommon.Hash `meddler:"hash"`
|
||||
ParentHash ethCommon.Hash `meddler:"-"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user