statefetcher

package
v0.111.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ledger

type Ledger interface {
	GetConfig() config.Blockchain
	HeaderHeight() uint32
	AddContractStorageItems(kv []storage.KeyValue, syncHeight uint32, expectedRoot util.Uint256) error
	GetLastStoredKey() []byte
}

Ledger is the interface for statefetcher.

type Service

type Service struct {
	neofs.BasicService
	// contains filtered or unexported fields
}

Service fetches contract storage state from NeoFS.

func New

func New(chain Ledger, cfg config.NeoFSStateFetcher, stateSyncInterval int, logger *zap.Logger, shutdownCallback func()) (*Service, error)

New creates a new Service instance.

func (*Service) IsActive

func (s *Service) IsActive() bool

IsActive checks if the service is running.

func (*Service) IsShutdown

func (s *Service) IsShutdown() bool

IsShutdown checks if the service is fully shut down.

func (*Service) LatestStateObjectHeight

func (s *Service) LatestStateObjectHeight(h ...uint32) (uint32, error)

LatestStateObjectHeight returns the height of the most recent state object found in the container.

func (*Service) Shutdown

func (s *Service) Shutdown()

Shutdown requests graceful shutdown of the service.

func (*Service) Start

func (s *Service) Start() error

Start begins state fetching.

Jump to

Keyboard shortcuts

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