github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/storage/badger/operation/chunk_locators.go (about)

     1  package operation
     2  
     3  import (
     4  	"github.com/dgraph-io/badger/v2"
     5  
     6  	"github.com/onflow/flow-go/model/chunks"
     7  	"github.com/onflow/flow-go/model/flow"
     8  )
     9  
    10  func InsertChunkLocator(locator *chunks.Locator) func(*badger.Txn) error {
    11  	return insert(makePrefix(codeChunk, locator.ID()), locator)
    12  }
    13  
    14  func RetrieveChunkLocator(locatorID flow.Identifier, locator *chunks.Locator) func(*badger.Txn) error {
    15  	return retrieve(makePrefix(codeChunk, locatorID), locator)
    16  }