persisters

package
v0.43.1-rc.8 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockPersister

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

BlockPersister stores execution data for a single execution result into the database. It uses the set of stores.PersisterStore to persist the data with a single atomic batch operation. To ensure the database only contains data certified by the protocol, the block persister must only be called for sealed execution results.

func NewBlockPersister

func NewBlockPersister(
	log zerolog.Logger,
	protocolDB storage.DB,
	lockManager lockctx.Manager,
	executionResult *flow.ExecutionResult,
	persisterStores []stores.PersisterStore,
) *BlockPersister

NewBlockPersister creates a new block persister.

func (*BlockPersister) Persist

func (p *BlockPersister) Persist() error

Persist atomically stores all data into the database using the configured persister stores.

No error returns are expected during normal operations

type RegistersPersister

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

RegistersPersister stores register data for a single execution result into the registers db in a single atomic batch operation. To ensure the database only contains data certified by the protocol, the registers persister must only be called for sealed execution results.

func NewRegistersPersister

func NewRegistersPersister(
	data []flow.RegisterEntry,
	registers storage.RegisterIndex,
	height uint64,
) *RegistersPersister

func (*RegistersPersister) Persist

func (r *RegistersPersister) Persist() error

Persist stores the register entries into the registers db

No error returns are expected during normal operations

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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