github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/storage/badger/operation/guarantees.go (about) 1 package operation 2 3 import ( 4 "github.com/dgraph-io/badger/v2" 5 6 "github.com/onflow/flow-go/model/flow" 7 ) 8 9 func InsertGuarantee(collID flow.Identifier, guarantee *flow.CollectionGuarantee) func(*badger.Txn) error { 10 return insert(makePrefix(codeGuarantee, collID), guarantee) 11 } 12 13 func RetrieveGuarantee(collID flow.Identifier, guarantee *flow.CollectionGuarantee) func(*badger.Txn) error { 14 return retrieve(makePrefix(codeGuarantee, collID), guarantee) 15 } 16 17 func IndexPayloadGuarantees(blockID flow.Identifier, guarIDs []flow.Identifier) func(*badger.Txn) error { 18 return insert(makePrefix(codePayloadGuarantees, blockID), guarIDs) 19 } 20 21 func LookupPayloadGuarantees(blockID flow.Identifier, guarIDs *[]flow.Identifier) func(*badger.Txn) error { 22 return retrieve(makePrefix(codePayloadGuarantees, blockID), guarIDs) 23 }