github.com/onflow/flow-go@v0.33.17/storage/badger/operation/interactions.go (about)

     1  package operation
     2  
     3  import (
     4  	"github.com/onflow/flow-go/fvm/storage/snapshot"
     5  	"github.com/onflow/flow-go/model/flow"
     6  
     7  	"github.com/dgraph-io/badger/v2"
     8  )
     9  
    10  func InsertExecutionStateInteractions(
    11  	blockID flow.Identifier,
    12  	executionSnapshots []*snapshot.ExecutionSnapshot,
    13  ) func(*badger.Txn) error {
    14  	return insert(
    15  		makePrefix(codeExecutionStateInteractions, blockID),
    16  		executionSnapshots)
    17  }
    18  
    19  func RetrieveExecutionStateInteractions(
    20  	blockID flow.Identifier,
    21  	executionSnapshots *[]*snapshot.ExecutionSnapshot,
    22  ) func(*badger.Txn) error {
    23  	return retrieve(
    24  		makePrefix(codeExecutionStateInteractions, blockID), executionSnapshots)
    25  }