temporal

package
v0.0.0-...-ff78b6e Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestDB

func NewTestDB(tb testing.TB, dirs datadir.Dirs, gspec *types.Genesis) (histV3 bool, db kv.RwDB, agg *state.AggregatorV3)

TODO: need remove `gspec` param (move SystemContractCodeLookup feature somewhere)

Types

type DB

type DB struct {
	kv.RwDB
	// contains filtered or unexported fields
}

func New

func New(db kv.RwDB, agg *state.AggregatorV3, systemContractLookup map[common.Address][]common.CodeRecord) (*DB, error)

func (*DB) Agg

func (db *DB) Agg() *state.AggregatorV3

func (*DB) BeginRo

func (db *DB) BeginRo(ctx context.Context) (kv.Tx, error)

TODO: it's temporary method, allowing inject TemproalTx without changing code. But it's not type-safe.

func (*DB) BeginRw

func (db *DB) BeginRw(ctx context.Context) (kv.RwTx, error)

func (*DB) BeginRwNosync

func (db *DB) BeginRwNosync(ctx context.Context) (kv.RwTx, error)

func (*DB) BeginTemporalRo

func (db *DB) BeginTemporalRo(ctx context.Context) (kv.TemporalTx, error)

func (*DB) BeginTemporalRw

func (db *DB) BeginTemporalRw(ctx context.Context) (kv.RwTx, error)

func (*DB) BeginTemporalRwNosync

func (db *DB) BeginTemporalRwNosync(ctx context.Context) (kv.RwTx, error)

func (*DB) InternalDB

func (db *DB) InternalDB() kv.RwDB

func (*DB) Update

func (db *DB) Update(ctx context.Context, f func(tx kv.RwTx) error) error

func (*DB) UpdateNosync

func (db *DB) UpdateNosync(ctx context.Context, f func(tx kv.RwTx) error) error

func (*DB) View

func (db *DB) View(ctx context.Context, f func(tx kv.Tx) error) error

func (*DB) ViewTemporal

func (db *DB) ViewTemporal(ctx context.Context, f func(tx kv.TemporalTx) error) error

type Tx

type Tx struct {
	*mdbx.MdbxTx
	// contains filtered or unexported fields
}

func (*Tx) Agg

func (tx *Tx) Agg() *state.AggregatorV3

func (*Tx) AggCtx

func (tx *Tx) AggCtx() *state.AggregatorV3Context

func (*Tx) Commit

func (tx *Tx) Commit() error

func (*Tx) DomainGet

func (tx *Tx) DomainGet(name kv.Domain, key, key2 []byte) (v []byte, ok bool, err error)

func (*Tx) DomainGetAsOf

func (tx *Tx) DomainGetAsOf(name kv.Domain, key, key2 []byte, ts uint64) (v []byte, ok bool, err error)

func (*Tx) DomainRange

func (tx *Tx) DomainRange(name kv.Domain, fromKey, toKey []byte, asOfTs uint64, asc order.By, limit int) (it iter.KV, err error)

func (*Tx) HistoryGet

func (tx *Tx) HistoryGet(name kv.History, key []byte, ts uint64) (v []byte, ok bool, err error)

func (*Tx) HistoryRange

func (tx *Tx) HistoryRange(name kv.History, fromTs, toTs int, asc order.By, limit int) (it iter.KV, err error)

func (*Tx) IndexRange

func (tx *Tx) IndexRange(name kv.InvertedIdx, k []byte, fromTs, toTs int, asc order.By, limit int) (timestamps iter.U64, err error)

func (*Tx) Rollback

func (tx *Tx) Rollback()

Jump to

Keyboard shortcuts

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