driver

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	*rpc.ClientConfig
	P2PSyncVerifiedBlocks bool
	P2PSyncTimeout        time.Duration
	RetryInterval         time.Duration
	MaxExponent           uint64
	BlobServerEndpoint    *url.URL
}

Config contains the configurations to initialize a Taiko driver.

func NewConfigFromCliContext

func NewConfigFromCliContext(c *cli.Context) (*Config, error)

NewConfigFromCliContext creates a new config instance from the command line inputs.

type Driver

type Driver struct {
	*Config
	// contains filtered or unexported fields
}

Driver keeps the L2 execution engine's local block chain in sync with the TaikoL1 contract.

func (*Driver) ChainSyncer added in v0.1.5

func (d *Driver) ChainSyncer() *chainSyncer.L2ChainSyncer

ChainSyncer returns the driver's chain syncer, this method should only be used for testing.

func (*Driver) Close

func (d *Driver) Close(_ context.Context)

Close closes the driver instance.

func (*Driver) InitFromCli

func (d *Driver) InitFromCli(ctx context.Context, c *cli.Context) error

InitFromCli initializes the given driver instance based on the command line flags.

func (*Driver) InitFromConfig added in v0.19.0

func (d *Driver) InitFromConfig(ctx context.Context, cfg *Config) (err error)

InitFromConfig initializes the driver instance based on the given configurations.

func (*Driver) Name

func (d *Driver) Name() string

Name returns the application name.

func (*Driver) Start

func (d *Driver) Start() error

Start starts the driver instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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