genesisstore

package
v0.0.0-...-34d0e24 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FilesHashMaxMemUsage = 256 * opt.MiB
	FilesHashPieceSize   = 64 * opt.MiB
)
View Source
const (
	BlocksSection = "brs"
	EpochsSection = "ers"
	EvmSection    = "evm"
)

Variables

View Source
var (
	FileHeader  = hexutils.HexToBytes("641b00ac")
	FileVersion = hexutils.HexToBytes("00020001")
)

Functions

This section is empty.

Types

type Blocks

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

func (Blocks) ForEach

func (s Blocks) ForEach(fn func(ibr.LlrIdxFullBlockRecord) bool)

type Epochs

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

func (Epochs) ForEach

func (s Epochs) ForEach(fn func(ier.LlrIdxFullEpochRecord) bool)

type FilesMap

type FilesMap func(string) (io.Reader, error)

type RawEvmItems

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

func (RawEvmItems) ForEach

func (s RawEvmItems) ForEach(fn func(key, value []byte) bool)

type ReadAtSeekerCloser

type ReadAtSeekerCloser interface {
	io.ReaderAt
	io.Seeker
	io.Closer
}

type Store

type Store struct {
	logger.Instance
	// contains filtered or unexported fields
}

Store is a node persistent storage working over a physical zip archive.

func NewStore

func NewStore(fMap FilesMap, head genesis.Header, close func() error) *Store

NewStore creates store over key-value db.

func OpenGenesisStore

func OpenGenesisStore(rawReader ReadAtSeekerCloser) (*Store, genesis.Hashes, error)

func (*Store) Blocks

func (s *Store) Blocks() genesis.Blocks

func (*Store) Close

func (s *Store) Close() error

Close leaves underlying database.

func (*Store) Epochs

func (s *Store) Epochs() genesis.Epochs

func (*Store) Genesis

func (s *Store) Genesis() genesis.Genesis

func (Store) Header

func (s Store) Header() genesis.Header

func (*Store) RawEvmItems

func (s *Store) RawEvmItems() genesis.EvmItems

type Unit

type Unit struct {
	UnitName string
	Header   genesis.Header
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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