blockgadget

package
v1.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewEvents = event.CreateGroupConstructor(func() (newEvents *Events) {
	return &Events{
		BlockPreAccepted:  event.New1[*blocks.Block](),
		BlockPreConfirmed: event.New1[*blocks.Block](),
		BlockAccepted:     event.New1[*blocks.Block](),
		BlockConfirmed:    event.New1[*blocks.Block](),
	}
})

NewEvents contains the constructor of the Events object (it is generated by a generic factory).

Functions

This section is empty.

Types

type Events

type Events struct {
	BlockPreAccepted  *event.Event1[*blocks.Block]
	BlockPreConfirmed *event.Event1[*blocks.Block]
	BlockAccepted     *event.Event1[*blocks.Block]
	BlockConfirmed    *event.Event1[*blocks.Block]

	event.Group[Events, *Events]
}

type Gadget

type Gadget interface {
	module.Module

	TrackWitnessWeight(votingBlock *blocks.Block)
	SetAccepted(block *blocks.Block) bool

	// Reset resets the component to a clean state as if it was created at the last commitment.
	Reset()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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