mandosConverter

package
v1.999.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BenchmarkMandosSpecificTx

func BenchmarkMandosSpecificTx(b *testing.B, mandosTestPath string)

BenchmarkMandosSpecificTx -

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 CheckConverter(t *testing.T, mandosTestPath string)

CheckConverter -

func CheckStorage

func CheckStorage(t *testing.T, dataTrie state.DataTrieTracker, mandosAccStorage map[string][]byte)

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) 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) ([][]byte, 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) error

ProcessAllTransactions -

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) 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL