state

package
v0.0.0-...-91eafdd Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 6 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 {
	Path       string `json:"path"`
	CacheLimit int    `json:"cache"`
}

type State

type State struct {
	Syncing bool    `json:"syncing"`
	Config  *Config `json:"config"`
	Cache   *cache.BlockStack[common.Block]
}

func Init

func Init(cfg *Config, chainId *uint64) (*State, error)

create new state instance

func (*State) Save

func (s *State) Save() error

type StateData

type StateData struct {
	ChainId *uint64 `json:"chainId"`
}

type StateFile

type StateFile struct {
	ChainId   *uint64        `json:"chainId"`
	Timestamp int64          `json:"updated"`
	Cache     []common.Block `json:"cache"`
}

Jump to

Keyboard shortcuts

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