Documentation ¶
Index ¶
- func BenchmarkScenariosSpecificTx(b *testing.B, scenariosTestPath string)
- func CheckAccounts(t *testing.T, accAdapter state.AccountsAdapter, ...)
- func CheckConverter(t *testing.T, scenariosTestPath string)
- func CheckStorage(t *testing.T, dataTrie state.UserAccountHandler, ...)
- func CheckTransactions(t *testing.T, transactions []*transaction.Transaction, ...)
- func CreateAccountsFromScenariosAccs(tc *vm.VMTestContext, scenariosUserAccounts []*mge.TestAccount) error
- func CreateTransactionsFromScenariosTxs(scenariosTxs []*mge.Transaction) (transactions []*transaction.Transaction)
- func DeploySCsFromScenariosDeployTxs(testContext *vm.VMTestContext, deployScenariosTxs []*mge.Transaction) ([][]byte, error)
- func ProcessAllTransactions(testContext *vm.VMTestContext, transactions []*transaction.Transaction) error
- func ReplaceScenariosScAddressesWithNewScAddresses(deployedScAccounts []*mge.TestAccount, newScAddresses [][]byte, ...)
- func RunSingleTransactionBenchmark(b *testing.B, testContext *vm.VMTestContext, tx *transaction.Transaction) error
- func SetStateFromScenariosTest(scenariosTestPath string) (testContext *vm.VMTestContext, transactions []*transaction.Transaction, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BenchmarkScenariosSpecificTx ¶
BenchmarkScenariosSpecificTx -
func CheckAccounts ¶
func CheckAccounts(t *testing.T, accAdapter state.AccountsAdapter, scenariosAccounts []*mge.TestAccount)
CheckAccounts will verify if scenariosAccounts correspond to AccountsAdapter accounts
func CheckStorage ¶
func CheckStorage(t *testing.T, dataTrie state.UserAccountHandler, scenariosAccStorage map[string][]byte)
CheckStorage checks if the dataTrie of an account equals with the storage of the corresponding scenariosAccount
func CheckTransactions ¶
func CheckTransactions(t *testing.T, transactions []*transaction.Transaction, scenariosTransactions []*mge.Transaction)
CheckTransactions checks if the transactions correspond with the scenariosTransactions
func CreateAccountsFromScenariosAccs ¶
func CreateAccountsFromScenariosAccs(tc *vm.VMTestContext, scenariosUserAccounts []*mge.TestAccount) error
CreateAccountsFromScenariosAccs uses scenariosAccounts to populate the AccountsAdapter
func CreateTransactionsFromScenariosTxs ¶
func CreateTransactionsFromScenariosTxs(scenariosTxs []*mge.Transaction) (transactions []*transaction.Transaction)
CreateTransactionsFromScenariosTxs converts scenarios transactions intro trasnsactions that can be processed by the txProcessor
func DeploySCsFromScenariosDeployTxs ¶
func DeploySCsFromScenariosDeployTxs(testContext *vm.VMTestContext, deployScenariosTxs []*mge.Transaction) ([][]byte, error)
DeploySCsFromScenariosDeployTxs deploys all smartContracts correspondent to "scDeploy" in a scenarios test, then replaces with the correct computed address in all the transactions.
func ProcessAllTransactions ¶
func ProcessAllTransactions(testContext *vm.VMTestContext, transactions []*transaction.Transaction) error
ProcessAllTransactions -
func ReplaceScenariosScAddressesWithNewScAddresses ¶
func ReplaceScenariosScAddressesWithNewScAddresses(deployedScAccounts []*mge.TestAccount, newScAddresses [][]byte, scenariosTxs []*mge.Transaction)
ReplaceScenariosScAddressesWithNewScAddresses corrects the Scenarios SC Addresses, with the new Addresses obtained from deploying the SCs
func RunSingleTransactionBenchmark ¶
func RunSingleTransactionBenchmark(b *testing.B, testContext *vm.VMTestContext, tx *transaction.Transaction) error
RunSingleTransactionBenchmark receives the VMTestContext (which can be created with SetStateFromScenariosTest), a tx and performs a benchmark on that specific tx. If processing transaction fails, it will return error, else will return nil
func SetStateFromScenariosTest ¶
func SetStateFromScenariosTest(scenariosTestPath string) (testContext *vm.VMTestContext, transactions []*transaction.Transaction, bechmarkTxPos int, err error)
SetStateFromScenariosTest recieves path to scenariosTest, returns a VMTestContext with the specified accounts, an array with the specified transactions and an error
Types ¶
This section is empty.