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) error
InitContractStorageSync(r state.MPTRoot) error
GetLastStoredKey() []byte
VerifyWitness(h util.Uint160, c hash.Hashable, w *transaction.Witness, gas int64) (int64, error)
}
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) Init ¶ added in v0.115.0
Init initializes Service to fetch the most recent state from NeoFS within [minH, maxH] height range. If max is 0, the latest available state object is returned. If the cached state object doesn't match the search criteria, a new search will be initiated followed by the Service's cache update. The object height is returned.
func (*Service) IsShutdown ¶
IsShutdown checks if the service is fully shut down.
Click to show internal directories.
Click to hide internal directories.