dutydb

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemDB

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

MemDB is a in-memory dutyDB implementation. It is a placeholder for the badgerDB implementation.

func NewMemDB

func NewMemDB() *MemDB

NewMemDB returns a new in-memory dutyDB instance.

func (*MemDB) AwaitAttestation

func (db *MemDB) AwaitAttestation(ctx context.Context, slot int64, commIdx int64) (*eth2p0.AttestationData, error)

AwaitAttestation implements core.DutyDB, see its godoc.

func (*MemDB) AwaitBeaconBlock added in v0.3.0

func (db *MemDB) AwaitBeaconBlock(ctx context.Context, slot int64) (*spec.VersionedBeaconBlock, error)

AwaitBeaconBlock implements core.DutyDB, see its godoc.

func (*MemDB) PubKeyByAttestation

func (db *MemDB) PubKeyByAttestation(_ context.Context, slot, commIdx, valCommIdx int64) (core.PubKey, error)

PubKeyByAttestation implements core.DutyDB, see its godoc.

func (*MemDB) Shutdown added in v0.4.0

func (db *MemDB) Shutdown()

Shutdown results in all blocking queries to return shutdown errors. Note this may once be called *once*.

func (*MemDB) Store

func (db *MemDB) Store(_ context.Context, duty core.Duty, unsignedSet core.UnsignedDataSet) error

Store implements core.DutyDB, see its godoc.

Jump to

Keyboard shortcuts

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