github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mempool/model/incorporated_result_map.go (about) 1 package model 2 3 import "github.com/onflow/flow-go/model/flow" 4 5 // IncorporatedResultMap is an internal data structure for the incorporated 6 // results mempool. IncorporatedResults are indexed by ExecutionResult ID and 7 // IncorporatedBlockID 8 type IncorporatedResultMap struct { 9 ExecutionResult *flow.ExecutionResult 10 IncorporatedResults map[flow.Identifier]*flow.IncorporatedResult // [incorporated block ID] => IncorporatedResult 11 } 12 13 // ID implements flow.Entity.ID for IncorporatedResultMap to make it capable of 14 // being stored directly in mempools and storage. 15 func (a *IncorporatedResultMap) ID() flow.Identifier { 16 return a.ExecutionResult.ID() 17 } 18 19 // CheckSum implements flow.Entity.CheckSum for IncorporatedResultMap to make it 20 // capable of being stored directly in mempools and storage. It makes the id of 21 // the entire IncorporatedResultMap. 22 func (a *IncorporatedResultMap) Checksum() flow.Identifier { 23 return flow.MakeID(a) 24 }