persistence

package
v1.9.7-0...-3df01fa Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeaconChainDatabase

type BeaconChainDatabase interface {
	BlockSource
	BeaconChainWriter
}

type BeaconChainWriter

type BeaconChainWriter interface {
	WriteBlock(ctx context.Context, tx kv.RwTx, block *cltypes.SignedBeaconBlock, canonical bool) error
}

type BeaconRpcSource

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

func NewBeaconRpcSource

func NewBeaconRpcSource(rpc *rpc.BeaconRpcP2P) *BeaconRpcSource

func (*BeaconRpcSource) GetBlock

func (*BeaconRpcSource) GetRange

func (b *BeaconRpcSource) GetRange(ctx context.Context, _ kv.Tx, from uint64, count uint64) (*peers.PeeredObject[[]*cltypes.SignedBeaconBlock], error)

func (*BeaconRpcSource) PurgeRange

func (b *BeaconRpcSource) PurgeRange(ctx context.Context, _ kv.Tx, from uint64, count uint64) error

a noop for rpc source since we always return new data

func (*BeaconRpcSource) SaveBlocks

type BlockSource

type BlockSource interface {
	GetRange(ctx context.Context, tx kv.Tx, from uint64, count uint64) (*peers.PeeredObject[[]*cltypes.SignedBeaconBlock], error)
	PurgeRange(ctx context.Context, tx kv.Tx, from uint64, count uint64) error
	GetBlock(ctx context.Context, tx kv.Tx, slot uint64) (*peers.PeeredObject[*cltypes.SignedBeaconBlock], error)
}

Jump to

Keyboard shortcuts

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