slashing

package
v0.0.1-beta.6 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

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

Index builds and provides slashing history of miners

func New

func New(ds datastore.TxnDatastore, api *apistruct.FullNodeStruct) (*Index, error)

New returns a new SlashingIndex. It will load previous state from ds, and immediately start getting in sync with new on-chain.

func (*Index) Close

func (s *Index) Close() error

Close closes the SlashindIndex

func (*Index) Get

func (s *Index) Get() IndexSnapshot

Get returns a copy of the current index information

func (*Index) Listen

func (s *Index) Listen() <-chan struct{}

Listen returns a a signaler channel which signals that index information has been updated.

func (*Index) Unregister

func (s *Index) Unregister(c chan struct{})

Unregister frees a channel from the signaler hub

type IndexSnapshot

type IndexSnapshot struct {
	TipSetKey string
	Miners    map[string]Slashes
}

IndexSnapshot contains slashing histoy information up-to a TipSetKey.

type Slashes

type Slashes struct {
	Epochs []uint64
}

Slashes contains a slice of distinct epochs for a miner

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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