head

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parameter

type Parameter interface {
	// contains filtered or unexported methods
}

Parameter is the interface for service parameters.

func WithAttesterSlashedScript

func WithAttesterSlashedScript(script string) Parameter

WithAttesterSlashedScript sets the script when an attester is slashed.

func WithBlock added in v1.2.3

func WithBlock(block string) Parameter

WithBlock sets the block to run against.

func WithETH2Client

func WithETH2Client(eth2Client eth2client.Service) Parameter

WithETH2Client sets the Ethereum 2 client for this module.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

func WithMonitor

func WithMonitor(monitor metrics.Service) Parameter

WithMonitor sets the monitor for this module.

func WithProposerSlashedScript

func WithProposerSlashedScript(script string) Parameter

WithProposerSlashedScript sets the script when an proposer is slashed.

type Service

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

Service is slashings services that watches blocks for slashings.

func New

func New(ctx context.Context, params ...Parameter) (*Service, error)

New creates a new service.

func (*Service) OnAttesterSlashed

func (s *Service) OnAttesterSlashed(_ context.Context, index spec.ValidatorIndex) error

OnAttesterSlashed handles an attester slashing event.

func (*Service) OnHeadUpdated

func (s *Service) OnHeadUpdated(
	ctx context.Context,
	_ spec.Slot,
	blockRoot spec.Root,
)

OnHeadUpdated handles head notifications.

func (*Service) OnProposerSlashed

func (s *Service) OnProposerSlashed(_ context.Context, index spec.ValidatorIndex) error

OnProposerSlashed handles a proposer slashing event.

Jump to

Keyboard shortcuts

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