primary

package
v0.35.4 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockData

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

BlockData is a rudimentary in-memory MVCC database for storing (RegisterID, RegisterValue) pairs for a particular block. The database enforces atomicity, consistency, and isolation, but not durability (The transactions are made durable by the block computer using aggregated execution snapshots).

func NewBlockData

func NewBlockData(
	storageSnapshot snapshot.StorageSnapshot,
	snapshotTime logical.Time,
) *BlockData

Note: storageSnapshot must be thread safe.

func (*BlockData) LatestSnapshot

func (block *BlockData) LatestSnapshot() timestampedSnapshotTree

func (*BlockData) NewCachingSnapshotReadTransactionData added in v0.33.19

func (block *BlockData) NewCachingSnapshotReadTransactionData(
	parameters state.StateParameters,
) *TransactionData

func (*BlockData) NewSnapshotReadTransactionData

func (block *BlockData) NewSnapshotReadTransactionData(
	parameters state.StateParameters,
) *TransactionData

func (*BlockData) NewTransactionData

func (block *BlockData) NewTransactionData(
	executionTime logical.Time,
	parameters state.StateParameters,
) (
	*TransactionData,
	error,
)

type TransactionData

type TransactionData struct {
	state.NestedTransactionPreparer
	// contains filtered or unexported fields
}

func (*TransactionData) Commit

func (txn *TransactionData) Commit() (
	*snapshot.ExecutionSnapshot,
	error,
)

func (*TransactionData) Finalize

func (txn *TransactionData) Finalize() error

func (*TransactionData) SnapshotTime

func (txn *TransactionData) SnapshotTime() logical.Time

func (*TransactionData) Validate

func (txn *TransactionData) Validate() error

Jump to

Keyboard shortcuts

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