mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-06 09:42:19 +00:00
887b72ff11
Former-commit-id: fc39828fa985074ec20fd3ec1a99c612630b8b1f [formerly 89a47cea8d6d4c2ab1aa77d1d713680394dc823e] Former-commit-id: 44edff25e19c39aeefbf08f260373c0976248f74
28 lines
992 B
Go
28 lines
992 B
Go
package sharding
|
|
|
|
import (
|
|
"math/big"
|
|
|
|
"github.com/ethereum/go-ethereum/common"
|
|
)
|
|
|
|
type Collation struct {
|
|
header *CollationHeader
|
|
body []byte
|
|
}
|
|
|
|
type CollationHeader struct {
|
|
shardID *big.Int //the shard ID of the shard
|
|
chunkRoot *common.Hash //the root of the chunk tree which identifies collation body
|
|
period *big.Int //the period number in which collation to be included
|
|
proposerAddress *common.Address //address of the collation proposer
|
|
proposerSignature []byte //the proposer's signature for calculating collation hash
|
|
}
|
|
|
|
func (c *Collation) Header() *CollationHeader { return c.header }
|
|
func (c *Collation) ShardID() *big.Int { return c.header.shardID }
|
|
func (c *Collation) Period() *big.Int { return c.header.period }
|
|
func (c *Collation) ProposerAddress() *common.Address { return c.header.proposerAddress }
|
|
|
|
func (c *Collation) SetHeader(h *CollationHeader) { c.header = h }
|