epochcheck

package
v0.0.0-...-34d0e24 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTooManyParents    = errors.New("event has too many parents")
	ErrTooBigGasUsed     = errors.New("event uses too much gas power")
	ErrWrongGasUsed      = errors.New("event has incorrect gas power")
	ErrUnderpriced       = errors.New("event transaction underpriced")
	ErrTooBigExtra       = errors.New("event extra data is too large")
	ErrWrongVersion      = errors.New("event has wrong version")
	ErrUnsupportedTxType = errors.New("unsupported tx type")
	ErrNotRelevant       = base.ErrNotRelevant
	ErrAuth              = base.ErrAuth
)

Functions

func CalcGasPowerUsed

func CalcGasPowerUsed(e inter.EventPayloadI, rules opera.Rules) uint64

func CheckTxs

func CheckTxs(txs types.Transactions, rules opera.Rules) error

Types

type Checker

type Checker struct {
	Base *base.Checker
	// contains filtered or unexported fields
}

Checker which require only current epoch info

func New

func New(reader Reader) *Checker

func (*Checker) Validate

func (v *Checker) Validate(e inter.EventPayloadI) error

Validate event

type Reader

type Reader interface {
	base.Reader
	GetEpochRules() (opera.Rules, idx.Epoch)
}

Reader returns currents epoch and its validators group.

Jump to

Keyboard shortcuts

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