Documentation ¶
Index ¶
- func NewExchange[H header.Header](store header.Store[H]) header.Exchange[H]
- type Exchange
- func (l *Exchange[H]) Get(ctx context.Context, hash header.Hash) (H, error)
- func (l *Exchange[H]) GetByHeight(ctx context.Context, height uint64) (H, error)
- func (l *Exchange[H]) GetRangeByHeight(ctx context.Context, origin, amount uint64) ([]H, error)
- func (l *Exchange[H]) GetVerifiedRange(ctx context.Context, from H, amount uint64) ([]H, error)
- func (l *Exchange[H]) Head(ctx context.Context) (H, error)
- func (l *Exchange[H]) Start(context.Context) error
- func (l *Exchange[H]) Stop(context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Exchange ¶
Exchange is a simple Exchange that reads Headers from Store without any networking.
func (*Exchange[H]) GetByHeight ¶
func (*Exchange[H]) GetRangeByHeight ¶
func (*Exchange[H]) GetVerifiedRange ¶
Click to show internal directories.
Click to hide internal directories.