realcomponents

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: GPL-3.0 Imports: 39 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

Jump to

Keyboard shortcuts

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