Documentation ¶
Index ¶
- Constants
- Variables
- func CheckGenerateTransactions(t *testing.T, chainSimulator ChainSimulator)
- func CheckGetAccount(t *testing.T, chainSimulator ChainSimulator)
- func CheckSetEntireState(t *testing.T, chainSimulator ChainSimulator, ...)
- func CheckSetEntireStateWithRemoval(t *testing.T, chainSimulator ChainSimulator, ...)
- func CheckSetState(t *testing.T, chainSimulator ChainSimulator, ...)
- func GenerateTransaction(sender []byte, nonce uint64, receiver []byte, value *big.Int, data string, ...) *transaction.Transaction
- type ChainSimulator
Constants ¶
View Source
const (
// OkReturnCode the const for the ok return code
OkReturnCode = "ok"
)
Variables ¶
View Source
var ( // ZeroValue the variable for the zero big int ZeroValue = big.NewInt(0) // OneEGLD the variable for one egld value OneEGLD = big.NewInt(1000000000000000000) // MinimumStakeValue the variable for the minimum stake value MinimumStakeValue = big.NewInt(0).Mul(OneEGLD, big.NewInt(2500)) // InitialAmount the variable for initial minting amount in account InitialAmount = big.NewInt(0).Mul(OneEGLD, big.NewInt(100)) )
Functions ¶
func CheckGenerateTransactions ¶ added in v1.7.14
func CheckGenerateTransactions(t *testing.T, chainSimulator ChainSimulator)
CheckGenerateTransactions -
func CheckGetAccount ¶ added in v1.7.14
func CheckGetAccount(t *testing.T, chainSimulator ChainSimulator)
CheckGetAccount -
func CheckSetEntireState ¶ added in v1.7.14
func CheckSetEntireState(t *testing.T, chainSimulator ChainSimulator, nodeHandler chainSimulatorProcess.NodeHandler, accountState *dtos.AddressState)
CheckSetEntireState -
func CheckSetEntireStateWithRemoval ¶ added in v1.7.14
func CheckSetEntireStateWithRemoval(t *testing.T, chainSimulator ChainSimulator, nodeHandler chainSimulatorProcess.NodeHandler, accountState *dtos.AddressState)
CheckSetEntireStateWithRemoval -
func CheckSetState ¶ added in v1.7.14
func CheckSetState(t *testing.T, chainSimulator ChainSimulator, nodeHandler chainSimulatorProcess.NodeHandler)
CheckSetState -
func GenerateTransaction ¶ added in v1.7.14
func GenerateTransaction(sender []byte, nonce uint64, receiver []byte, value *big.Int, data string, gasLimit uint64) *transaction.Transaction
GenerateTransaction will generate a transaction based on input data
Types ¶
type ChainSimulator ¶
type ChainSimulator interface { GenerateBlocks(numOfBlocks int) error GenerateBlocksUntilEpochIsReached(targetEpoch int32) error AddValidatorKeys(validatorsPrivateKeys [][]byte) error GetNodeHandler(shardID uint32) process.NodeHandler RemoveAccounts(addresses []string) error SendTxAndGenerateBlockTilTxIsExecuted(txToSend *transaction.Transaction, maxNumOfBlockToGenerateWhenExecutingTx int) (*transaction.ApiTransactionResult, error) SendTxsAndGenerateBlocksTilAreExecuted(txsToSend []*transaction.Transaction, maxNumOfBlocksToGenerateWhenExecutingTx int) ([]*transaction.ApiTransactionResult, error) SetStateMultiple(stateSlice []*dtos.AddressState) error GenerateAndMintWalletAddress(targetShardID uint32, value *big.Int) (dtos.WalletAddress, error) GetInitialWalletKeys() *dtos.InitialWalletKeys GetAccount(address dtos.WalletAddress) (api.AccountResponse, error) ForceResetValidatorStatisticsCache() error GetValidatorPrivateKeys() []crypto.PrivateKey SetKeyValueForAddress(address string, keyValueMap map[string]string) error Close() }
ChainSimulator defines the operations for an entity that can simulate operations of a chain
Click to show internal directories.
Click to hide internal directories.