github.com/koko1123/flow-go-1@v0.29.6/storage/seals.go (about)

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