Documentation ¶
Index ¶
- func AccountExists(accnts state.AccountsAdapter, addressBytes []byte) bool
- func ComputeExpectedBalance(existing *big.Int, transferred *big.Int, gasLimit uint64, gasPrice uint64) *big.Int
- func CreateAccount(accnts state.AccountsAdapter, pubKey []byte, nonce uint64, balance *big.Int) ([]byte, error)
- func CreateDeployTx(senderAddressBytes []byte, senderNonce uint64, value *big.Int, gasPrice uint64, ...) *dataTransaction.Transaction
- func CreateEmptyAddress() []byte
- func CreateInMemoryShardAccountsDB() *state.AccountsDB
- func CreateMemUnit() storage.Storer
- func CreateOneSCExecutorMockVM(accnts state.AccountsAdapter) vmcommon.VMExecutionHandler
- func CreatePreparedTxProcessorAndAccountsWithMockedVM(tb testing.TB, vmOpGas uint64, senderNonce uint64, senderAddressBytes []byte, ...) (process.TransactionProcessor, state.AccountsAdapter)
- func CreateTransaction(nonce uint64, value *big.Int, sndAddress []byte, rcvAddress []byte, ...) *dataTransaction.Transaction
- func CreateTransferTokenTx(nonce uint64, functionName string, value *big.Int, scAddrress []byte, ...) *dataTransaction.Transaction
- func CreateTx(tb testing.TB, senderAddressBytes []byte, receiverAddressBytes []byte, ...) *dataTransaction.Transaction
- func CreateTxProcessorWithOneSCExecutorMockVM(tb testing.TB, accnts state.AccountsAdapter, opGas uint64, ...) process.TransactionProcessor
- func CreateTxProcessorWithOneSCExecutorWithVMs(tb testing.TB, accnts state.AccountsAdapter, ...) (process.TransactionProcessor, process.SmartContractProcessor, ...)
- func CreateVMAndBlockchainHook(accnts state.AccountsAdapter, gasSchedule map[string]map[string]uint64, ...) (process.VirtualMachinesContainer, *hooks.BlockChainHookImpl)
- func GetIntValueFromSC(gasSchedule map[string]map[string]uint64, accnts state.AccountsAdapter, ...) *big.Int
- func GetNodeIndex(nodeList []*integrationTests.TestProcessorNode, ...) (int, error)
- func TestAccount(t *testing.T, accnts state.AccountsAdapter, senderAddressBytes []byte, ...) *big.Int
- func TestDeployedContractContents(t *testing.T, destinationAddressBytes []byte, accnts state.AccountsAdapter, ...)
- type ArgEnableEpoch
- type VMTestContext
- func CreatePreparedTxProcessorAndAccountsWithVMs(tb testing.TB, senderNonce uint64, senderAddressBytes []byte, ...) VMTestContext
- func CreatePreparedTxProcessorWithVMs(tb testing.TB, warmInstance bool, argEnableEpoch ArgEnableEpoch) VMTestContext
- func CreatePreparedTxProcessorWithVMsMultiShard(tb testing.TB, selfShardID uint32, argEnableEpoch ArgEnableEpoch) *VMTestContext
- func CreateTxProcessorArwenVMWithGasSchedule(tb testing.TB, senderNonce uint64, senderAddressBytes []byte, ...) VMTestContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountExists ¶
func AccountExists(accnts state.AccountsAdapter, addressBytes []byte) bool
AccountExists -
func ComputeExpectedBalance ¶
func ComputeExpectedBalance( existing *big.Int, transferred *big.Int, gasLimit uint64, gasPrice uint64, ) *big.Int
ComputeExpectedBalance -
func CreateAccount ¶
func CreateAccount(accnts state.AccountsAdapter, pubKey []byte, nonce uint64, balance *big.Int) ([]byte, error)
CreateAccount -
func CreateDeployTx ¶
func CreateDeployTx( senderAddressBytes []byte, senderNonce uint64, value *big.Int, gasPrice uint64, gasLimit uint64, scCodeAndVMType string, ) *dataTransaction.Transaction
CreateDeployTx -
func CreateInMemoryShardAccountsDB ¶
func CreateInMemoryShardAccountsDB() *state.AccountsDB
CreateInMemoryShardAccountsDB -
func CreateOneSCExecutorMockVM ¶
func CreateOneSCExecutorMockVM(accnts state.AccountsAdapter) vmcommon.VMExecutionHandler
CreateOneSCExecutorMockVM -
func CreatePreparedTxProcessorAndAccountsWithMockedVM ¶
func CreatePreparedTxProcessorAndAccountsWithMockedVM( tb testing.TB, vmOpGas uint64, senderNonce uint64, senderAddressBytes []byte, senderBalance *big.Int, argEnableEpoch ArgEnableEpoch, ) (process.TransactionProcessor, state.AccountsAdapter)
CreatePreparedTxProcessorAndAccountsWithMockedVM -
func CreateTransaction ¶ added in v1.1.15
func CreateTransaction( nonce uint64, value *big.Int, sndAddress []byte, rcvAddress []byte, gasprice uint64, gasLimit uint64, data []byte, ) *dataTransaction.Transaction
CreateTransaction -
func CreateTransferTokenTx ¶
func CreateTransferTokenTx( nonce uint64, functionName string, value *big.Int, scAddrress []byte, sndAddress []byte, rcvAddress []byte, ) *dataTransaction.Transaction
CreateTransferTokenTx -
func CreateTx ¶
func CreateTx( tb testing.TB, senderAddressBytes []byte, receiverAddressBytes []byte, senderNonce uint64, value *big.Int, gasPrice uint64, gasLimit uint64, scCodeOrFunc string, ) *dataTransaction.Transaction
CreateTx -
func CreateTxProcessorWithOneSCExecutorMockVM ¶
func CreateTxProcessorWithOneSCExecutorMockVM( tb testing.TB, accnts state.AccountsAdapter, opGas uint64, argEnableEpoch ArgEnableEpoch, ) process.TransactionProcessor
CreateTxProcessorWithOneSCExecutorMockVM -
func CreateTxProcessorWithOneSCExecutorWithVMs ¶
func CreateTxProcessorWithOneSCExecutorWithVMs( tb testing.TB, accnts state.AccountsAdapter, vmContainer process.VirtualMachinesContainer, blockChainHook *hooks.BlockChainHookImpl, feeAccumulator process.TransactionFeeHandler, shardCoordinator sharding.Coordinator, argEnableEpoch ArgEnableEpoch, ) (process.TransactionProcessor, process.SmartContractProcessor, process.IntermediateTransactionHandler)
CreateTxProcessorWithOneSCExecutorWithVMs -
func CreateVMAndBlockchainHook ¶
func CreateVMAndBlockchainHook( accnts state.AccountsAdapter, gasSchedule map[string]map[string]uint64, warmInstance bool, outOfProcess bool, shardCoordinator sharding.Coordinator, ) (process.VirtualMachinesContainer, *hooks.BlockChainHookImpl)
CreateVMAndBlockchainHook -
func GetIntValueFromSC ¶
func GetIntValueFromSC(gasSchedule map[string]map[string]uint64, accnts state.AccountsAdapter, scAddressBytes []byte, funcName string, args ...[]byte) *big.Int
GetIntValueFromSC -
func GetNodeIndex ¶ added in v1.1.15
func GetNodeIndex(nodeList []*integrationTests.TestProcessorNode, node *integrationTests.TestProcessorNode) (int, error)
GetNodeIndex -
Types ¶
type ArgEnableEpoch ¶ added in v1.1.16
type ArgEnableEpoch struct { PenalizedTooMuchGasEnableEpoch uint32 BuiltinEnableEpoch uint32 DeployEnableEpoch uint32 MetaProtectionEnableEpoch uint32 RelayedTxEnableEpoch uint32 }
ArgEnableEpoch will specify the enable epoch values for certain flags
type VMTestContext ¶ added in v0.0.5
type VMTestContext struct { TxProcessor process.TransactionProcessor ScProcessor process.SmartContractProcessor Accounts state.AccountsAdapter BlockchainHook vmcommon.BlockchainHook VMContainer process.VirtualMachinesContainer TxFeeHandler process.TransactionFeeHandler ShardCoordinator sharding.Coordinator ScForwarder process.IntermediateTransactionHandler }
VMTestContext -
func CreatePreparedTxProcessorAndAccountsWithVMs ¶
func CreatePreparedTxProcessorAndAccountsWithVMs( tb testing.TB, senderNonce uint64, senderAddressBytes []byte, senderBalance *big.Int, warmInstance bool, argEnableEpoch ArgEnableEpoch, ) VMTestContext
CreatePreparedTxProcessorAndAccountsWithVMs -
func CreatePreparedTxProcessorWithVMs ¶ added in v1.1.15
func CreatePreparedTxProcessorWithVMs(tb testing.TB, warmInstance bool, argEnableEpoch ArgEnableEpoch) VMTestContext
CreatePreparedTxProcessorWithVMs -
func CreatePreparedTxProcessorWithVMsMultiShard ¶ added in v1.1.15
func CreatePreparedTxProcessorWithVMsMultiShard(tb testing.TB, selfShardID uint32, argEnableEpoch ArgEnableEpoch) *VMTestContext
CreatePreparedTxProcessorWithVMsMultiShard -
func CreateTxProcessorArwenVMWithGasSchedule ¶
func CreateTxProcessorArwenVMWithGasSchedule( tb testing.TB, senderNonce uint64, senderAddressBytes []byte, senderBalance *big.Int, gasSchedule map[string]map[string]uint64, warmInstance bool, outOfProcess bool, argEnableEpoch ArgEnableEpoch, ) VMTestContext
CreateTxProcessorArwenVMWithGasSchedule -
func (*VMTestContext) GetGasRemaining ¶ added in v1.1.12
func (vmTestContext *VMTestContext) GetGasRemaining() uint64
GetGasRemaining -
func (*VMTestContext) GetIntermediateTransactions ¶ added in v1.1.16
func (vmTestContext *VMTestContext) GetIntermediateTransactions(t *testing.T) []data.TransactionHandler
GetIntermediateTransactions -
func (*VMTestContext) GetLatestError ¶ added in v1.0.103
func (vmTestContext *VMTestContext) GetLatestError() error
GetLatestError -