store

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeaconState

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

func NewBeaconState

func NewBeaconState(log logrus.FieldLogger, config Config, namespace string) *BeaconState

func (*BeaconState) Add

func (c *BeaconState) Add(stateRoot phase0.Root, state *[]byte, expiresAt time.Time) error

func (*BeaconState) GetByStateRoot

func (c *BeaconState) GetByStateRoot(stateRoot phase0.Root) (*[]byte, error)

type Block

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

func NewBlock

func NewBlock(log logrus.FieldLogger, config Config, namespace string) *Block

func (*Block) Add

func (c *Block) Add(block *spec.VersionedSignedBeaconBlock, expiresAt time.Time) error

func (*Block) GetByRoot

func (c *Block) GetByRoot(root phase0.Root) (*spec.VersionedSignedBeaconBlock, error)

func (*Block) GetBySlot

func (c *Block) GetBySlot(slot phase0.Slot) (*spec.VersionedSignedBeaconBlock, error)

func (*Block) GetByStateRoot

func (c *Block) GetByStateRoot(stateRoot phase0.Root) (*spec.VersionedSignedBeaconBlock, error)

type Config

type Config struct {
	MaxItems int `yaml:"max_items"`
}

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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