executor

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBondingPeriod = errors.New("validator in bonding period")

ErrBondingPeriod is returned when a validator is in the bonding period.

View Source
var ErrCommitteeJoinLimitExceeded = errors.New(
	"the maximum stake joining the committee can't be more than 1/3 of the committee's total stake")

ErrCommitteeJoinLimitExceeded indicates that at each height, the maximum stake joining the committee can't be more than 1/3 of the committee's total stake.

View Source
var ErrCommitteeLeaveLimitExceeded = errors.New(
	"the maximum stake leaving the committee can't be more than 1/3 of the committee's total stake")

ErrCommitteeLeaveLimitExceeded indicates that at each height, the maximum stake leaving the committee can't be more than 1/3 of the committee's total stake.

View Source
var ErrExpiredSortition = errors.New("expired sortition")

ErrExpiredSortition indicates that the sortition transaction is duplicated or expired.

View Source
var ErrInsufficientFunds = errors.New("insufficient funds")

ErrInsufficientFunds indicates that the balance is insufficient for the transaction.

View Source
var ErrInvalidSortitionProof = errors.New("invalid sortition proof")

ErrInvalidSortitionProof indicates that the sortition proof is invalid.

View Source
var ErrOldestValidatorNotProposed = errors.New("oldest validator has not proposed any block yet")

ErrOldestValidatorNotProposed indicates that the oldest validator has not proposed any block yet.

View Source
var ErrPublicKeyAlreadySet = errors.New("public key is already set")

ErrPublicKeyAlreadySet indicates that the public key has already been set for the given validator.

View Source
var ErrPublicKeyNotSet = errors.New("public key is not set")

ErrPublicKeyNotSet indicates that the public key is not set for the initial Bond transaction.

View Source
var ErrUnbondingPeriod = errors.New("validator in unbonding period")

ErrUnbondingPeriod is returned when a validator is in the unbonding period.

View Source
var ErrValidatorBonded = errors.New("validator is bonded")

ErrValidatorBonded indicates that the validator is bonded.

View Source
var ErrValidatorInCommittee = errors.New("validator is in the committee")

ErrValidatorInCommittee indicates that the validator is in the committee.

View Source
var ErrValidatorUnbonded = errors.New("validator has unbonded")

ErrValidatorUnbonded indicates that the validator has unbonded.

Functions

This section is empty.

Types

type AccountNotFoundError added in v1.4.0

type AccountNotFoundError struct {
	Address crypto.Address
}

AccountNotFoundError is raised when the given address has no associated account.

func (AccountNotFoundError) Error added in v1.4.0

func (e AccountNotFoundError) Error() string

type BondExecutor

type BondExecutor struct {
	// contains filtered or unexported fields
}

func (*BondExecutor) Check added in v1.4.0

func (e *BondExecutor) Check(strict bool) error

func (*BondExecutor) Execute

func (e *BondExecutor) Execute()

type Executor added in v1.4.0

type Executor interface {
	Check(strict bool) error
	Execute()
}

func MakeExecutor added in v1.4.0

func MakeExecutor(trx *tx.Tx, sbx sandbox.Sandbox) (Executor, error)

type InvalidPayloadTypeError added in v1.4.0

type InvalidPayloadTypeError struct {
	PayloadType payload.Type
}

InvalidPayloadTypeError is returned when the transaction payload type is not valid.

func (InvalidPayloadTypeError) Error added in v1.4.0

func (e InvalidPayloadTypeError) Error() string

type MaximumStakeError added in v1.4.0

type MaximumStakeError struct {
	Maximum amount.Amount
}

MaximumStakeError is returned when the validator's stake exceeds the maximum stake limit.

func (MaximumStakeError) Error added in v1.4.0

func (e MaximumStakeError) Error() string

type SmallStakeError added in v1.4.0

type SmallStakeError struct {
	Minimum amount.Amount
}

SmallStakeError is returned when the stake amount is less than the minimum stake.

func (SmallStakeError) Error added in v1.4.0

func (e SmallStakeError) Error() string

type SortitionExecutor

type SortitionExecutor struct {
	// contains filtered or unexported fields
}

func (*SortitionExecutor) Check added in v1.4.0

func (e *SortitionExecutor) Check(strict bool) error

func (*SortitionExecutor) Execute

func (e *SortitionExecutor) Execute()

type TransferExecutor added in v0.11.0

type TransferExecutor struct {
	// contains filtered or unexported fields
}

func (*TransferExecutor) Check added in v1.4.0

func (e *TransferExecutor) Check(_ bool) error

func (*TransferExecutor) Execute added in v0.11.0

func (e *TransferExecutor) Execute()

type UnbondExecutor

type UnbondExecutor struct {
	// contains filtered or unexported fields
}

func (*UnbondExecutor) Check added in v1.4.0

func (e *UnbondExecutor) Check(strict bool) error

func (*UnbondExecutor) Execute

func (e *UnbondExecutor) Execute()

type ValidatorNotFoundError added in v1.4.0

type ValidatorNotFoundError struct {
	Address crypto.Address
}

ValidatorNotFoundError is raised when the given address has no associated validator.

func (ValidatorNotFoundError) Error added in v1.4.0

func (e ValidatorNotFoundError) Error() string

type WithdrawExecutor

type WithdrawExecutor struct {
	// contains filtered or unexported fields
}

func (*WithdrawExecutor) Check added in v1.4.0

func (e *WithdrawExecutor) Check(_ bool) error

func (*WithdrawExecutor) Execute

func (e *WithdrawExecutor) Execute()

Jump to

Keyboard shortcuts

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