epochcheck

package
v1.9.25-zilion-0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: MIT Imports: 5 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")
	ErrNotRelevant    = base.ErrNotRelevant
	ErrAuth           = base.ErrAuth
)

Functions

func CalcGasPowerUsed

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

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() (zilionixx.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