github.com/koko1123/flow-go-1@v0.29.6/cmd/bootstrap/run/block.go (about) 1 package run 2 3 import ( 4 "time" 5 6 "github.com/koko1123/flow-go-1/model/flow" 7 ) 8 9 func GenerateRootBlock(chainID flow.ChainID, parentID flow.Identifier, height uint64, timestamp time.Time) *flow.Block { 10 11 payload := &flow.Payload{ 12 Guarantees: nil, 13 Seals: nil, 14 } 15 header := &flow.Header{ 16 ChainID: chainID, 17 ParentID: parentID, 18 Height: height, 19 PayloadHash: payload.Hash(), 20 Timestamp: timestamp, 21 View: 0, 22 ParentVoterIndices: nil, 23 ParentVoterSigData: nil, 24 ProposerID: flow.ZeroID, 25 ProposerSigData: nil, 26 } 27 28 return &flow.Block{ 29 Header: header, 30 Payload: payload, 31 } 32 }