voluntaryexits

package
v1.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: GPL-3.0 Imports: 7 Imported by: 35

Documentation

Overview

Package voluntaryexits defines the operations management of voluntary exits.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

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

Pool implements a struct to maintain pending and recently included voluntary exits. This pool is used by proposers to insert into new blocks.

func NewPool

func NewPool() *Pool

NewPool accepts a head fetcher (for reading the validator set) and returns an initialized voluntary exit pool.

func (*Pool) InsertVoluntaryExit

func (p *Pool) InsertVoluntaryExit(ctx context.Context, state *beaconstate.BeaconState, exit *ethpb.SignedVoluntaryExit)

InsertVoluntaryExit into the pool. This method is a no-op if the pending exit already exists, has been included recently, or the validator is already exited.

func (*Pool) MarkIncluded

func (p *Pool) MarkIncluded(exit *ethpb.SignedVoluntaryExit)

MarkIncluded is used when an exit has been included in a beacon block. Every block seen by this node should call this method to include the exit.

func (*Pool) PendingExits

func (p *Pool) PendingExits(state *beaconstate.BeaconState, slot uint64) []*ethpb.SignedVoluntaryExit

PendingExits returns exits that are ready for inclusion at the given slot. This method will not return more than the block enforced MaxVoluntaryExits.

Jump to

Keyboard shortcuts

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