execution

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateFee added in v0.15.0

func CalculateFee(amt int64, params *param.Params) int64

Types

type Execution

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

func NewChecker

func NewChecker() *Execution

func NewExecutor

func NewExecutor() *Execution

func (*Execution) Execute

func (exe *Execution) Execute(trx *tx.Tx, sb sandbox.Sandbox) error

type Executor

type Executor interface {
	Execute(trx *tx.Tx, sb sandbox.Sandbox) error
}

type FutureLockTimeError added in v0.15.0

type FutureLockTimeError struct {
	LockTime uint32
}

FutureLockTimeError is returned when the lock time of a transaction is in the future, indicating the transaction is not yet eligible for processing.

func (FutureLockTimeError) Error added in v0.15.0

func (e FutureLockTimeError) Error() string

type PastLockTimeError added in v0.15.0

type PastLockTimeError struct {
	LockTime uint32
}

PastLockTimeError is returned when the lock time of a transaction is in the past and has expired, indicating the transaction can no longer be executed.

func (PastLockTimeError) Error added in v0.15.0

func (e PastLockTimeError) Error() string

type TransactionCommittedError added in v0.15.0

type TransactionCommittedError struct {
	ID tx.ID
}

TransactionCommittedError is returned when an attempt is made to replay a transaction that has already been committed. This is to prevent replay attacks where an attacker tries to submit the same transaction more than once.

func (TransactionCommittedError) Error added in v0.15.0

type UnknownPayloadTypeError added in v0.15.0

type UnknownPayloadTypeError struct {
	PayloadType payload.Type
}

UnknownPayloadTypeError is returned when transaction payload type is not valid.

func (UnknownPayloadTypeError) Error added in v0.15.0

func (e UnknownPayloadTypeError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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