github.com/koko1123/flow-go-1@v0.29.6/cmd/bootstrap/run/result.go (about)

     1  package run
     2  
     3  import (
     4  	"github.com/koko1123/flow-go-1/model/chunks"
     5  	"github.com/koko1123/flow-go-1/model/flow"
     6  )
     7  
     8  func GenerateRootResult(
     9  	block *flow.Block,
    10  	commit flow.StateCommitment,
    11  	epochSetup *flow.EpochSetup,
    12  	epochCommit *flow.EpochCommit,
    13  ) *flow.ExecutionResult {
    14  
    15  	result := &flow.ExecutionResult{
    16  		PreviousResultID: flow.ZeroID,
    17  		BlockID:          block.ID(),
    18  		Chunks:           chunks.ChunkListFromCommit(commit),
    19  		ServiceEvents:    []flow.ServiceEvent{epochSetup.ServiceEvent(), epochCommit.ServiceEvent()},
    20  	}
    21  	return result
    22  }