github.com/koko1123/flow-go-1@v0.29.6/cmd/bootstrap/run/seal.go (about) 1 package run 2 3 import ( 4 "fmt" 5 6 "github.com/koko1123/flow-go-1/model/flow" 7 ) 8 9 func GenerateRootSeal(result *flow.ExecutionResult) (*flow.Seal, error) { 10 finalState, err := result.FinalStateCommitment() 11 if err != nil { 12 return nil, fmt.Errorf("generating root seal failed: %w", err) 13 } 14 seal := &flow.Seal{ 15 BlockID: result.BlockID, 16 ResultID: result.ID(), 17 FinalState: finalState, 18 } 19 return seal, nil 20 }