github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/storage/transaction_results.go (about) 1 package storage 2 3 import "github.com/onflow/flow-go/model/flow" 4 5 // TransactionResults represents persistent storage for transaction result 6 type TransactionResults interface { 7 8 // BatchStore inserts a batch of transaction result into a batch 9 BatchStore(blockID flow.Identifier, transactionResults []flow.TransactionResult, batch BatchStorage) error 10 11 // ByBlockIDTransactionID returns the transaction result for the given block ID and transaction ID 12 ByBlockIDTransactionID(blockID flow.Identifier, transactionID flow.Identifier) (*flow.TransactionResult, error) 13 14 // ByBlockIDTransactionIndex returns the transaction result for the given blockID and transaction index 15 ByBlockIDTransactionIndex(blockID flow.Identifier, txIndex uint32) (*flow.TransactionResult, error) 16 17 // ByBlockID gets all transaction results for a block, ordered by transaction index 18 ByBlockID(id flow.Identifier) ([]flow.TransactionResult, error) 19 } 20 21 // LightTransactionResults represents persistent storage for light transaction result 22 type LightTransactionResults interface { 23 24 // BatchStore inserts a batch of transaction result into a batch 25 BatchStore(blockID flow.Identifier, transactionResults []flow.LightTransactionResult, batch BatchStorage) error 26 27 // ByBlockIDTransactionID returns the transaction result for the given block ID and transaction ID 28 ByBlockIDTransactionID(blockID flow.Identifier, transactionID flow.Identifier) (*flow.LightTransactionResult, error) 29 30 // ByBlockIDTransactionIndex returns the transaction result for the given blockID and transaction index 31 ByBlockIDTransactionIndex(blockID flow.Identifier, txIndex uint32) (*flow.LightTransactionResult, error) 32 33 // ByBlockID gets all transaction results for a block, ordered by transaction index 34 ByBlockID(id flow.Identifier) ([]flow.LightTransactionResult, error) 35 }