Documentation ¶
Index ¶
- func NewExchange(store header.Store) header.Exchange
- type Exchange
- func (l *Exchange) Get(ctx context.Context, hash bytes.HexBytes) (*header.ExtendedHeader, error)
- func (l *Exchange) GetByHeight(ctx context.Context, height uint64) (*header.ExtendedHeader, error)
- func (l *Exchange) GetRangeByHeight(ctx context.Context, origin, amount uint64) ([]*header.ExtendedHeader, error)
- func (l *Exchange) Head(ctx context.Context) (*header.ExtendedHeader, error)
- func (l *Exchange) Start(context.Context) error
- func (l *Exchange) Stop(context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) GetByHeight ¶
func (*Exchange) GetRangeByHeight ¶
Click to show internal directories.
Click to hide internal directories.