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

     1  package storage
     2  
     3  import (
     4  	"github.com/koko1123/flow-go-1/model/cluster"
     5  	"github.com/koko1123/flow-go-1/model/flow"
     6  )
     7  
     8  type ClusterBlocks interface {
     9  
    10  	// Store stores the cluster block.
    11  	Store(block *cluster.Block) error
    12  
    13  	// ByID returns the block with the given ID.
    14  	ByID(blockID flow.Identifier) (*cluster.Block, error)
    15  
    16  	// ByHeight returns the block with the given height. Only available for
    17  	// finalized blocks.
    18  	ByHeight(height uint64) (*cluster.Block, error)
    19  }