governance

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ProcessorPoolSize = 1

ProcessorPoolSize limits pool size for governance Processor. Processor manages governance sync tasks. This process must not be interrupted by other sync operation, so we limit pool size for processor to one.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlphabetState

type AlphabetState interface {
	IsAlphabet() bool
}

AlphabetState is a callback interface for inner ring global state.

type EpochState

type EpochState interface {
	EpochCounter() uint64
}

EpochState is a callback interface for inner ring global state.

type Params

type Params struct {
	Log *zap.Logger

	AlphabetState AlphabetState
	EpochState    EpochState
	Voter         Voter

	MorphClient   *client.Client
	MainnetClient *client.Client
	NeoFSClient   *neofscontract.ClientWrapper
	NetmapClient  *nmWrapper.Wrapper

	NotaryDisabled bool
}

Params of the processor constructor.

type Processor

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

Processor of events related to governance in the network.

func New

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

New creates balance contract processor instance.

func (*Processor) HandleAlphabetSync

func (gp *Processor) HandleAlphabetSync(e event.Event)

func (*Processor) ListenerHandlers

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

ListenerHandlers for the 'event.Listener' event producer.

func (*Processor) ListenerParsers

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

ListenerParsers for the 'event.Listener' event producer.

func (*Processor) TimersHandlers

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

TimersHandlers for the 'Timers' event producer.

type Sync

type Sync struct{}

Sync is a event to start governance synchronization.

func NewSyncEvent

func NewSyncEvent() Sync

func (Sync) MorphEvent

func (s Sync) MorphEvent()

MorphEvent implements Event interface.

type Voter

type Voter interface {
	VoteForSidechainValidator(keys keys.PublicKeys) error
}

Voter is a callback interface for alphabet contract voting.

Jump to

Keyboard shortcuts

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