pendingdata

package
v0.15.16 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const BlockHashLag uint64 = 10

Variables

View Source
var (
	BlockHashStorageContract         = &felt.One
	ErrUnsupportedPendingDataVariant = errors.New("unsupported pending data variant")
)

Functions

func MakeEmptyPendingDataForParent

func MakeEmptyPendingDataForParent(
	bcReader blockchain.Reader,
	latestHeader *core.Header,
) (core.PendingData, error)

func MakeEmptyPendingForParent

func MakeEmptyPendingForParent(
	bcReader blockchain.Reader,
	latestHeader *core.Header,
) (core.Pending, error)

func MakeEmptyPreConfirmedForParent

func MakeEmptyPreConfirmedForParent(
	bcReader blockchain.Reader,
	latestHeader *core.Header,
) (core.PreConfirmed, error)

func NeedsPreConfirmed

func NeedsPreConfirmed(protocolVersion string) (bool, error)

needsPreConfirmed reports whether the given protocol version string indicates blocks >= v0.14.0 (i.e., pre_confirmed path is required).

func PendingState

func PendingState(
	pending core.PendingData,
	stateReader blockchain.Reader,
) (core.StateReader, blockchain.StateCloser, error)

PendingState is a convenience function that combines base state resolution with pending state creation

func PendingStateBeforeIndex

func PendingStateBeforeIndex(
	pending core.PendingData,
	stateReader blockchain.Reader,
	index uint,
) (core.StateReader, blockchain.StateCloser, error)

PendingStateBeforeIndex is a convenience function that combines base state resolution with pending state before index creation

func ResolvePendingBaseState

func ResolvePendingBaseState(
	pending *core.Pending,
	stateReader blockchain.Reader,
) (core.StateReader, blockchain.StateCloser, error)

func ResolvePendingDataBaseState

func ResolvePendingDataBaseState(
	pending core.PendingData,
	stateReader blockchain.Reader,
) (core.StateReader, blockchain.StateCloser, error)

ResolvePendingDataBaseState determines the appropriate base state for pending data and returns the state reader along with its closer function.

func ResolvePreConfirmedBaseState

func ResolvePreConfirmedBaseState(
	preConfirmed *core.PreConfirmed,
	stateReader blockchain.Reader,
) (core.StateReader, blockchain.StateCloser, error)

ResolvePreConfirmedBaseState resolves the base state for pre-confirmed blocks

Types

This section is empty.

Jump to

Keyboard shortcuts

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