indexedstore

package
v0.7.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IndexedStore

type IndexedStore interface {
	state.Store

	// BlockByIndex returns the block that corresponds to the given state index.
	BlockByIndex(uint32) (state.Block, error)
	// StateByIndex returns the chain state corresponding to the given state index
	StateByIndex(uint32) (state.State, error)
}

IndexedStore augments a Store with functions to search blocks by index.

func New

func New(s state.Store) IndexedStore

New returns an IndexedStore implemented by getting the blockinfo from the latest state.

func NewFake

func NewFake(s state.Store) IndexedStore

NewFake returns an implementation of IndexedStore that searches blocks by traversing the chain from the latest block.

Jump to

Keyboard shortcuts

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