gadgets

package
v0.10.4-reload-pending... Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: AGPL-3.0 Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Heights

type Heights struct {
	events.Noop
	// contains filtered or unexported fields
}

Heights is a protocol events consumer that provides an interface to subscribe to callbacks when chain state reaches a particular height.

func NewHeights

func NewHeights() *Heights

NewHeights returns a new Heights events gadget.

func (*Heights) BlockFinalized

func (g *Heights) BlockFinalized(block *flow.Header)

BlockFinalized handles block finalized protocol events, triggering height callbacks as needed.

func (*Heights) OnHeight

func (g *Heights) OnHeight(height uint64, callback func())

OnHeight registers the callback for the given height.

Jump to

Keyboard shortcuts

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