snapshots

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SnapshotTask

type SnapshotTask struct {
	*tasks.BaseTask
	Height          uint64
	NumOfValidators int
	ValidatorIndex  int
}

SnapshotTask pushes a snapshot to Ethereum.

func NewSnapshotTask

func NewSnapshotTask(height uint64, numOfValidators, validatorIndex int) *SnapshotTask

func (*SnapshotTask) Execute

func (t *SnapshotTask) Execute(ctx context.Context) (*types.Transaction, *tasks.TaskErr)

Execute executes the task business logic.

func (*SnapshotTask) Prepare

func (t *SnapshotTask) Prepare(ctx context.Context) *tasks.TaskErr

Prepare prepares for work to be done in the SnapshotTask.

func (*SnapshotTask) ShouldExecute

func (t *SnapshotTask) ShouldExecute(ctx context.Context) (bool, *tasks.TaskErr)

ShouldExecute checks if it makes sense to execute the task.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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