local

package
v0.6.2-dirty Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExchange

func NewExchange(store header.Store) header.Exchange

NewExchange creates a new local Exchange.

Types

type Exchange

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

NewExchange is a simple Exchange that reads Headers from Store without any networking.

func (*Exchange) Get

func (*Exchange) GetByHeight

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

func (*Exchange) GetRangeByHeight

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

func (*Exchange) GetVerifiedRange added in v0.5.0

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

func (*Exchange) Head

func (*Exchange) Start

func (l *Exchange) Start(context.Context) error

func (*Exchange) Stop

func (l *Exchange) Stop(context.Context) error

Jump to

Keyboard shortcuts

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