Documentation ¶
Index ¶
- type ProcessorRunner
- func (pr *ProcessorRunner) AddBalanceToAccount(tb testing.TB, address []byte, balanceToAdd *big.Int)
- func (pr *ProcessorRunner) Close(tb testing.TB)
- func (pr *ProcessorRunner) CreateDeploySCTx(tb testing.TB, owner []byte, contractPath string, gasLimit uint64, ...) (*transaction.Transaction, []byte)
- func (pr *ProcessorRunner) ExecuteTransactionAsScheduled(tb testing.TB, tx *transaction.Transaction) error
- func (pr *ProcessorRunner) GenerateAddress(shardID uint32) []byte
- func (pr *ProcessorRunner) GetUserAccount(tb testing.TB, address []byte) state.UserAccountHandler
- func (pr *ProcessorRunner) SetESDTForAccount(tb testing.TB, address []byte, tokenIdentifier string, esdtNonce uint64, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProcessorRunner ¶
type ProcessorRunner struct { Config config.Configs CoreComponents factory.CoreComponentsHolder CryptoComponents factory.CryptoComponentsHandler StatusCoreComponents factory.StatusCoreComponentsHolder NetworkComponents factory.NetworkComponentsHolder BootstrapComponents factory.BootstrapComponentsHolder DataComponents factory.DataComponentsHolder StateComponents factory.StateComponentsHolder NodesCoordinator nodesCoord.NodesCoordinator StatusComponents factory.StatusComponentsHolder ProcessComponents factory.ProcessComponentsHolder // contains filtered or unexported fields }
ProcessorRunner is a test emulation to the nodeRunner component
func NewProcessorRunner ¶
func NewProcessorRunner(tb testing.TB, config config.Configs) *ProcessorRunner
NewProcessorRunner returns a new instance of ProcessorRunner
func (*ProcessorRunner) AddBalanceToAccount ¶
func (pr *ProcessorRunner) AddBalanceToAccount(tb testing.TB, address []byte, balanceToAdd *big.Int)
AddBalanceToAccount will add the provided balance to the account
func (*ProcessorRunner) Close ¶
func (pr *ProcessorRunner) Close(tb testing.TB)
Close will close all inner components
func (*ProcessorRunner) CreateDeploySCTx ¶
func (pr *ProcessorRunner) CreateDeploySCTx( tb testing.TB, owner []byte, contractPath string, gasLimit uint64, initialHexParameters []string, ) (*transaction.Transaction, []byte)
CreateDeploySCTx will return the transaction and the hash for the deployment smart-contract transaction
func (*ProcessorRunner) ExecuteTransactionAsScheduled ¶
func (pr *ProcessorRunner) ExecuteTransactionAsScheduled(tb testing.TB, tx *transaction.Transaction) error
ExecuteTransactionAsScheduled will execute the provided transaction as scheduled
func (*ProcessorRunner) GenerateAddress ¶
func (pr *ProcessorRunner) GenerateAddress(shardID uint32) []byte
GenerateAddress will generate an address for the given shardID
func (*ProcessorRunner) GetUserAccount ¶
func (pr *ProcessorRunner) GetUserAccount(tb testing.TB, address []byte) state.UserAccountHandler
GetUserAccount will return the user account for the provided address
func (*ProcessorRunner) SetESDTForAccount ¶
func (pr *ProcessorRunner) SetESDTForAccount( tb testing.TB, address []byte, tokenIdentifier string, esdtNonce uint64, esdtValue *big.Int, )
SetESDTForAccount will set the provided ESDT balance to the account
Click to show internal directories.
Click to hide internal directories.