listener

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPostageSyncingStalled = errors.New("postage syncing stalled")
)

Functions

func New

func New(
	logger logging.Logger,
	ev BlockHeightContractFilterer,
	postageStampAddress common.Address,
	blockTime uint64,
	shutdowner Shutdowner,
	stallingTimeout time.Duration,
	backoffTime time.Duration,
) postage.Listener

Types

type BlockHeightContractFilterer

type BlockHeightContractFilterer interface {
	FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error)
	BlockNumber(context.Context) (uint64, error)
}

type Shutdowner

type Shutdowner interface {
	Shutdown(context.Context) error
}

Shutdowner interface is passed to the listener to shutdown the node if we hit error while listening for blockchain events.

Jump to

Keyboard shortcuts

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