github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/storage/badger/operation/transactions.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 // InsertTransaction inserts a transaction keyed by transaction fingerprint. 10 func InsertTransaction(txID flow.Identifier, tx *flow.TransactionBody) func(*badger.Txn) error { 11 return insert(makePrefix(codeTransaction, txID), tx) 12 } 13 14 // RetrieveTransaction retrieves a transaction by fingerprint. 15 func RetrieveTransaction(txID flow.Identifier, tx *flow.TransactionBody) func(*badger.Txn) error { 16 return retrieve(makePrefix(codeTransaction, txID), tx) 17 }