staking

package
v1.7.10 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// OkReturnCode the const for the ok return code
	OkReturnCode = "ok"
	// MockBLSSignature the const for a mocked bls signature
	MockBLSSignature = "010101"
	// GasLimitForStakeOperation the const for the gas limit value for the stake operation
	GasLimitForStakeOperation = 50_000_000
	// GasLimitForUnBond the const for the gas limit value for the unBond operation
	GasLimitForUnBond = 12_000_000
	// MaxNumOfBlockToGenerateWhenExecutingTx the const for the maximum number of block to generate when execute a transaction
	MaxNumOfBlockToGenerateWhenExecutingTx = 7

	// QueuedStatus the const for the queued status of a validators
	QueuedStatus = "queued"
	// StakedStatus the const for the staked status of a validators
	StakedStatus = "staked"
	// NotStakedStatus the const for the notStaked status of a validators
	NotStakedStatus = "notStaked"
	// AuctionStatus the const for the action status of a validators
	AuctionStatus = "auction"
	// UnStakedStatus the const for the unStaked status of a validators
	UnStakedStatus = "unStaked"
)

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)
	//InitialDelegationValue the variable for the initial delegation value
	InitialDelegationValue = big.NewInt(0).Mul(OneEGLD, big.NewInt(1250))
	// MinimumStakeValue the variable for the minimum stake value
	MinimumStakeValue = big.NewInt(0).Mul(OneEGLD, big.NewInt(2500))
)

Functions

func CheckValidatorStatus

func CheckValidatorStatus(t *testing.T, cs chainSimulatorIntegrationTests.ChainSimulator, blsKey string, expectedStatus string)

CheckValidatorStatus will compare the status of the provided bls key with the provided expected status

func GenerateTransaction

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

func GetAllNodeStates

func GetAllNodeStates(t *testing.T, metachainNode chainSimulatorProcess.NodeHandler, address []byte) map[string]string

GetAllNodeStates will return the status of all the nodes that belong to the provided address

func GetBLSKeyStatus

func GetBLSKeyStatus(t *testing.T, metachainNode chainSimulatorProcess.NodeHandler, blsKey []byte) string

GetBLSKeyStatus will return the bls key status

func GetNonce

GetNonce will return the nonce of the provided address

Types

This section is empty.

Jump to

Keyboard shortcuts

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