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

     1  package storage
     2  
     3  import (
     4  	"github.com/onflow/flow-go/model/flow"
     5  )
     6  
     7  // Seals represents persistent storage for seals.
     8  type Seals interface {
     9  
    10  	// Store inserts the seal.
    11  	Store(seal *flow.Seal) error
    12  
    13  	// ByID retrieves the seal by the collection
    14  	// fingerprint.
    15  	ByID(sealID flow.Identifier) (*flow.Seal, error)
    16  
    17  	// HighestInFork retrieves the highest seal that was included in the
    18  	// fork up to (and including) the given blockID.
    19  	// This method should return
    20  	//   - a seal for any block known to the node.
    21  	//   - storage.ErrNotFound if blockID is unknown.
    22  	HighestInFork(blockID flow.Identifier) (*flow.Seal, error)
    23  
    24  	// FinalizedSealForBlock retrieves the finalized seal for the given block ID.
    25  	// Returns storage.ErrNotFound if blockID is unknown or no _finalized_ seal
    26  	// is known for the block.
    27  	FinalizedSealForBlock(blockID flow.Identifier) (*flow.Seal, error)
    28  }