staketest

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// DefaultDelAmount is the default delegation amount
	DefaultDelAmount = new(big.Int).Set(twentyKOnes)

	// DefaultMinSelfDel is the default value of MinSelfDelegation
	DefaultMinSelfDel = new(big.Int).Set(tenKOnes)

	// DefaultMaxTotalDel is the default value of MaxTotalDelegation
	DefaultMaxTotalDel = new(big.Int).Set(hundredKOnes)
)

Functions

func CheckValidatorEqual added in v1.10.0

func CheckValidatorEqual(v1, v2 staking.Validator) error

CheckValidatorEqual checks the equality of validator. If not equal, an error is returned. Note nil pointer is treated as zero in this compare function.

func CheckValidatorWrapperEqual added in v1.10.0

func CheckValidatorWrapperEqual(w1, w2 staking.ValidatorWrapper) error

CheckValidatorWrapperEqual checks the equality of staking.ValidatorWrapper. If not equal, an error is returned. Note nil pointer is treated as zero in this compare function.

func CopyCommission

func CopyCommission(c staking.Commission) staking.Commission

CopyCommission deep copy the Commission

func CopyDelegation

func CopyDelegation(d staking.Delegation) staking.Delegation

CopyDelegation copies staking.Delegation

func CopyDelegations

func CopyDelegations(ds staking.Delegations) staking.Delegations

CopyDelegations deeps copy staking.Delegations

func CopyUndelegation

func CopyUndelegation(ud staking.Undelegation) staking.Undelegation

CopyUndelegation deep copies staking.Undelegation

func CopyUndelegations

func CopyUndelegations(uds staking.Undelegations) staking.Undelegations

CopyUndelegations deep copies staking.Undelegations

func CopyValidator

func CopyValidator(v staking.Validator) staking.Validator

CopyValidator deep copies staking.Validator

func CopyValidatorWrapper

func CopyValidatorWrapper(w staking.ValidatorWrapper) staking.ValidatorWrapper

CopyValidatorWrapper deep copies staking.ValidatorWrapper

func GetDefaultValidator added in v1.10.0

func GetDefaultValidator() staking.Validator

GetDefaultValidator return the default staking.Validator for testing

func GetDefaultValidatorWithAddr added in v1.10.0

func GetDefaultValidatorWithAddr(addr common.Address, pubs []bls.SerializedPublicKey) staking.Validator

GetDefaultValidatorWithAddr return the default staking.Validator with the given validator address and bls keys

func GetDefaultValidatorWrapper added in v1.10.0

func GetDefaultValidatorWrapper() staking.ValidatorWrapper

GetDefaultValidatorWrapper return the default staking.ValidatorWrapper for testing

func GetDefaultValidatorWrapperWithAddr added in v1.10.0

func GetDefaultValidatorWrapperWithAddr(addr common.Address, pubs []bls.SerializedPublicKey) staking.ValidatorWrapper

GetDefaultValidatorWrapperWithAddr return the default staking.ValidatorWrapper with the given validator address and bls keys.

Types

This section is empty.

Jump to

Keyboard shortcuts

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