Documentation ¶
Index ¶
- func BenchmarkMandosSpecificTx(b *testing.B, mandosTestPath string)
- func CheckAccounts(t *testing.T, accAdapter state.AccountsAdapter, ...)
- func CheckConverter(t *testing.T, mandosTestPath string)
- func CheckStorage(t *testing.T, dataTrie state.DataTrieTracker, ...)
- func CheckTransactions(t *testing.T, transactions []*transaction.Transaction, ...)
- func CreateAccountsFromMandosAccs(tc *vm.VMTestContext, mandosUserAccounts []*mge.TestAccount) (err error)
- func CreateTransactionsFromMandosTxs(mandosTxs []*mge.Transaction) (transactions []*transaction.Transaction)
- func DeploySCsFromMandosDeployTxs(testContext *vm.VMTestContext, deployMandosTxs []*mge.Transaction) (newScAddresses [][]byte, err error)
- func ProcessAllTransactions(testContext *vm.VMTestContext, transactions []*transaction.Transaction) (err error)
- func ReplaceMandosScAddressesWithNewScAddresses(deployedScAccounts []*mge.TestAccount, newScAddresses [][]byte, ...)
- func RunSingleTransactionBenchmark(b *testing.B, testContext *vm.VMTestContext, tx *transaction.Transaction) (err error)
- func SetStateFromMandosTest(mandosTestPath string) (testContext *vm.VMTestContext, transactions []*transaction.Transaction, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAccounts ¶
func CheckAccounts(t *testing.T, accAdapter state.AccountsAdapter, mandosAccounts []*mge.TestAccount)
CheckAccounts will verify if mandosAccounts correspond to AccountsAdapter accounts
func CheckConverter ¶
func CheckStorage ¶
CheckStorage checks if the dataTrie of an account equals with the storage of the corresponding mandosAccount
func CheckTransactions ¶
func CheckTransactions(t *testing.T, transactions []*transaction.Transaction, mandosTransactions []*mge.Transaction)
CheckTransactions checks if the transactions correspond with the mandosTransactions
func CreateAccountsFromMandosAccs ¶
func CreateAccountsFromMandosAccs(tc *vm.VMTestContext, mandosUserAccounts []*mge.TestAccount) (err error)
CreateAccountsFromMandosAccs uses mandosAccounts to populate the AccountsAdapter
func CreateTransactionsFromMandosTxs ¶
func CreateTransactionsFromMandosTxs(mandosTxs []*mge.Transaction) (transactions []*transaction.Transaction)
CreateTransactionsFromMandosTxs converts mandos transactions intro trasnsactions that can be processed by the txProcessor
func DeploySCsFromMandosDeployTxs ¶
func DeploySCsFromMandosDeployTxs(testContext *vm.VMTestContext, deployMandosTxs []*mge.Transaction) (newScAddresses [][]byte, err error)
DeploySCsFromMandosDeployTxs deploys all smartContracts correspondent to "scDeploy" in a mandos test, then replaces with the correct computed address in all the transactions.
func ProcessAllTransactions ¶
func ProcessAllTransactions(testContext *vm.VMTestContext, transactions []*transaction.Transaction) (err error)
func ReplaceMandosScAddressesWithNewScAddresses ¶
func ReplaceMandosScAddressesWithNewScAddresses(deployedScAccounts []*mge.TestAccount, newScAddresses [][]byte, mandosTxs []*mge.Transaction)
ReplaceMandosScAddressesWithNewScAddresses corrects the Mandos SC Addresses, with the new Addresses obtained from deploying the SCs
func RunSingleTransactionBenchmark ¶
func RunSingleTransactionBenchmark(b *testing.B, testContext *vm.VMTestContext, tx *transaction.Transaction) (err error)
RunSingleTransactionBenchmark receives the VMTestContext (which can be created with SetStateFromMandosTest), a tx and performs a benchmark on that specific tx. If processing transaction fails, it will return error, else will return nil
func SetStateFromMandosTest ¶
func SetStateFromMandosTest(mandosTestPath string) (testContext *vm.VMTestContext, transactions []*transaction.Transaction, bechmarkTxPos int, err error)
SetStateFromMandosTest recieves path to mandosTest, returns a VMTestContext with the specified accounts, an array with the specified transactions and an error
Types ¶
This section is empty.