github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/model/flow/incorporated_result_seal.go (about)

     1  package flow
     2  
     3  // IncorporatedResultSeal is a wrapper around a seal that keeps track of which
     4  // IncorporatedResult the seal corresponds to. Sealing is a function of result
     5  // And the ID of the block in which the result was incorporated, which is all
     6  // contained in IncorporatedResult.
     7  type IncorporatedResultSeal struct {
     8  	// IncorporatedResult is the incorporated result (result + ID of block where
     9  	// it was incorporated) that the seal is for.
    10  	IncorporatedResult *IncorporatedResult
    11  
    12  	// Seal is a seal for the result contained in IncorporatedResult.
    13  	Seal *Seal
    14  
    15  	// the header of the executed block
    16  	// useful for indexing the seal by height in the mempool in order for fast pruning
    17  	Header *Header
    18  }
    19  
    20  // ID implements flow.Entity.ID for IncorporatedResultSeal to make it capable of
    21  // being stored directly in mempools and storage.
    22  func (s *IncorporatedResultSeal) ID() Identifier {
    23  	return s.IncorporatedResult.ID()
    24  }
    25  
    26  // CheckSum implements flow.Entity.CheckSum for IncorporatedResultSeal to make
    27  // it capable of being stored directly in mempools and storage.
    28  func (s *IncorporatedResultSeal) Checksum() Identifier {
    29  	return MakeID(s)
    30  }