core

package
v0.3.1-account Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exchange

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

func NewExchange

func NewExchange(fetcher *core.BlockFetcher, bServ blockservice.BlockService, construct header.ConstructFn) *Exchange

func (*Exchange) Get

func (*Exchange) GetByHeight

func (ce *Exchange) GetByHeight(ctx context.Context, height uint64) (*header.ExtendedHeader, error)

func (*Exchange) GetRangeByHeight

func (ce *Exchange) GetRangeByHeight(ctx context.Context, from, amount uint64) ([]*header.ExtendedHeader, error)

func (*Exchange) Head

func (ce *Exchange) Head(ctx context.Context) (*header.ExtendedHeader, error)

type Listener

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

Listener is responsible for listening to Core for new block events and converting new Core blocks into the main data structure used in the Celestia DA network: `ExtendedHeader`. After digesting the Core block, extending it, and generating the `ExtendedHeader`, the Listener broadcasts the new `ExtendedHeader` to the header-sub gossipsub network.

func NewListener

func NewListener(
	bcast header.Broadcaster,
	fetcher *core.BlockFetcher,
	bServ blockservice.BlockService,
	construct header.ConstructFn,
) *Listener

func (*Listener) Start

func (cl *Listener) Start(ctx context.Context) error

Start kicks off the Listener listener loop.

func (*Listener) Stop

func (cl *Listener) Stop(ctx context.Context) error

Stop stops the Listener listener loop.

Jump to

Keyboard shortcuts

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