github.com/koko1123/flow-go-1@v0.29.6/storage/epoch_commits.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 EpochCommits interface {
    11  
    12  	// StoreTx allows us to store a new epoch commit in a DB transaction while updating the cache.
    13  	StoreTx(commit *flow.EpochCommit) func(*transaction.Tx) error
    14  
    15  	// ByID will return the EpochCommit event by its ID.
    16  	// Error returns:
    17  	// * storage.ErrNotFound if no EpochCommit with the ID exists
    18  	ByID(flow.Identifier) (*flow.EpochCommit, error)
    19  }