github.com/koko1123/flow-go-1@v0.29.6/storage/epoch_statuses.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  	"github.com/koko1123/flow-go-1/storage/badger/transaction"
     8  )
     9  
    10  type EpochStatuses interface {
    11  
    12  	// StoreTx stores a new epoch state in a DB transaction while going through the cache.
    13  	StoreTx(blockID flow.Identifier, state *flow.EpochStatus) func(*transaction.Tx) error
    14  
    15  	// ByBlockID will return the epoch status for the given block
    16  	// Error returns:
    17  	// * storage.ErrNotFound if EpochStatus for the block does not exist
    18  	ByBlockID(flow.Identifier) (*flow.EpochStatus, error)
    19  }