initialsync

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: GPL-3.0 Imports: 25 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package initialsync includes all initial block download and processing logic for the node, using a round robin strategy and a finite-state-machine to handle edge-cases in a beacon node's sync status.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	P2P   p2p.P2P
	Chain common.IBlockChain
}

Config to set up the initial sync service.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service service.

func NewService

func NewService(ctx context.Context, cfg *Config) *Service

NewService configures the initial sync service responsible for bringing the node up to the latest head of the blockchain.

func (*Service) Resync

func (s *Service) Resync() error

Resync allows a node to start syncing again if it has fallen behind the current network head.

func (*Service) Start

func (s *Service) Start()

Start the initial sync service.

func (*Service) Status

func (s *Service) Status() error

Status of initial sync.

func (*Service) Stop

func (s *Service) Stop() error

Stop initial sync.

func (*Service) Synced

func (s *Service) Synced() bool

Synced returns true if initial sync has been completed.

func (*Service) Syncing

func (s *Service) Syncing() bool

Syncing returns true if initial sync is still running.

Jump to

Keyboard shortcuts

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