block

package
v0.0.0-...-2adbdf0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: CC0-1.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FixMissingBlocksCmd

func FixMissingBlocksCmd(cmdCfg *cmdtypes.Config) *cobra.Command

func NewClientProxy

func NewClientProxy(cfg types.Config) (client.ClientProxy, error)

NewClientProxy allows to build a new Proxy instance

func StartFixing

func StartFixing(ctx *Context, start uint64, end uint64) error

Types

type Config

type Config interface {
	GetRegistrar() registrar.Registrar
	GetConfigParser() types.ConfigParser
	GetDBBuilder() db.Builder
	GetLogger() logging.Logger
}

Config contains all the configuration for the "parse" command

type Context

type Context struct {
	GlobalCfg types.Config
	Proxy     client.ClientProxy
	Database  db.Database
	Logger    logging.Logger
	Modules   []modules.Module
	Pool      pool.Pool
	SlotQueue types.SlotQueue
}

Context contains the parsing context

func GetFixContext

func GetFixContext(config Config) (*Context, error)

GetFixContext setups all the things that should be later passed in order to fix the chain data of missing blocks properly.

func NewContext

func NewContext(
	globalCfg types.Config, proxy client.ClientProxy, db db.Database,
	logger logging.Logger, modules []modules.Module,
	pool pool.Pool, slotQueue types.SlotQueue,
) *Context

NewContext builds a new Context instance

Jump to

Keyboard shortcuts

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