github.com/onflow/flow-go@v0.33.17/storage/epoch_commits.go (about) 1 // (c) 2019 Dapper Labs - ALL RIGHTS RESERVED 2 3 package storage 4 5 import ( 6 "github.com/onflow/flow-go/model/flow" 7 "github.com/onflow/flow-go/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 }