github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/storage/epoch_commits.go (about) 1 package storage 2 3 import ( 4 "github.com/onflow/flow-go/model/flow" 5 "github.com/onflow/flow-go/storage/badger/transaction" 6 ) 7 8 type EpochCommits interface { 9 10 // StoreTx allows us to store a new epoch commit in a DB transaction while updating the cache. 11 StoreTx(commit *flow.EpochCommit) func(*transaction.Tx) error 12 13 // ByID will return the EpochCommit event by its ID. 14 // Error returns: 15 // * storage.ErrNotFound if no EpochCommit with the ID exists 16 ByID(flow.Identifier) (*flow.EpochCommit, error) 17 }