netmap

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2021 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveState

type ActiveState interface {
	IsActive() bool
}

ActiveState is a callback interface for inner ring global state.

type EpochState

type EpochState interface {
	SetEpochCounter(uint64)
	EpochCounter() uint64
}

EpochState is a callback interface for inner ring global state.

type EpochTimerReseter

type EpochTimerReseter interface {
	ResetEpochTimer() error
}

EpochTimerReseter is a callback interface for tickers component.

type NodeValidator added in v0.15.0

type NodeValidator interface {
	// Must verify and update NodeInfo structure.
	//
	// Must return an error if NodeInfo input is invalid.
	// Must return an error if it is not possible to correctly
	// change the structure for sending to the network map.
	//
	// If no error occurs, the parameter must point to the
	// ready-made NodeInfo structure.
	VerifyAndUpdate(*netmap.NodeInfo) error
}

NodeValidator wraps basic method of checking the correctness of information about the node and its finalization for adding to the network map.

type Params

type Params struct {
	Log              *zap.Logger
	PoolSize         int
	NetmapContract   util.Uint160
	EpochTimer       EpochTimerReseter
	MorphClient      *client.Client
	EpochState       EpochState
	ActiveState      ActiveState
	CleanupEnabled   bool
	CleanupThreshold uint64 // in epochs
	ContainerWrapper *container.Wrapper

	HandleAudit             event.Handler
	AuditSettlementsHandler event.Handler

	NodeValidator NodeValidator
}

Params of the processor constructor.

type Processor

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

Processor of events produced by network map contract and new epoch ticker, because it is related to contract.

func New

func New(p *Params) (*Processor, error)

New creates network map contract processor instance.

func (*Processor) HandleNewEpochTick added in v0.15.0

func (np *Processor) HandleNewEpochTick(ev event.Event)

func (*Processor) ListenerHandlers

func (np *Processor) ListenerHandlers() []event.HandlerInfo

ListenerHandlers for the 'event.Listener' event producer.

func (*Processor) ListenerParsers

func (np *Processor) ListenerParsers() []event.ParserInfo

ListenerParsers for the 'event.Listener' event producer.

func (*Processor) TimersHandlers

func (np *Processor) TimersHandlers() []event.HandlerInfo

TimersHandlers for the 'Timers' event producer.

Directories

Path Synopsis
nodevalidation

Jump to

Keyboard shortcuts

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