attestation

package
v0.0.0-...-c85edb6 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package attestation defines the life-cycle and status of single and aggregated attestation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BeaconDB                *db.BeaconDB
	ReceiveAttestationBuf   int
	BroadcastAttestationBuf int
}

Config options for the service.

type Service

type Service struct {

	// AttestationPool is the mapping of individual
	// validator's public key to it's newest attestation.
	LatestAttestation map[[48]byte]*pb.Attestation
	// contains filtered or unexported fields
}

Service represents a service that handles the internal logic of managing single and aggregated attestation.

func NewAttestationService

func NewAttestationService(ctx context.Context, cfg *Config) *Service

NewAttestationService instantiates a new service instance that will be registered into a running beacon node.

func (*Service) IncomingAttestationFeed

func (a *Service) IncomingAttestationFeed() *event.Feed

IncomingAttestationFeed returns a feed that any service can send incoming p2p attestations into. The attestation service will subscribe to this feed in order to relay incoming attestations.

func (*Service) Start

func (a *Service) Start()

Start an attestation service's main event loop.

func (*Service) Status

func (a *Service) Status() error

Status always returns nil. TODO(1201): Add service health checks.

func (*Service) Stop

func (a *Service) Stop() error

Stop the Attestation service's main event loop and associated goroutines.

Jump to

Keyboard shortcuts

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