prestates

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPrestateUnavailable = errors.New("prestate unavailable")
)

Functions

This section is empty.

Types

type MultiPrestateProvider

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

func NewMultiPrestateProvider

func NewMultiPrestateProvider(baseUrl *url.URL, dataDir string) *MultiPrestateProvider

func (*MultiPrestateProvider) PrestatePath

func (m *MultiPrestateProvider) PrestatePath(hash common.Hash) (string, error)

type PrestateProviderCache

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

func NewPrestateProviderCache

func NewPrestateProviderCache(m caching.Metrics, label string, createProvider func(prestateHash common.Hash) (types.PrestateProvider, error)) *PrestateProviderCache

func (*PrestateProviderCache) GetOrCreate

func (p *PrestateProviderCache) GetOrCreate(prestateHash common.Hash) (types.PrestateProvider, error)

type PrestateSource

type PrestateSource interface {
	// PrestatePath returns the path to the prestate file to use for the game.
	// The provided prestateHash may be used to differentiate between different states but no guarantee is made that
	// the returned prestate matches the supplied hash.
	PrestatePath(prestateHash common.Hash) (string, error)
}

type SinglePrestateSource

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

func NewSinglePrestateSource

func NewSinglePrestateSource(path string) *SinglePrestateSource

func (*SinglePrestateSource) PrestatePath

func (s *SinglePrestateSource) PrestatePath(_ common.Hash) (string, error)

Jump to

Keyboard shortcuts

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