Documentation ¶
Index ¶
- func NewTestDB(tb testing.TB, dirs datadir.Dirs, gspec *types.Genesis) (histV3 bool, db kv.RwDB, agg *state.AggregatorV3)
- type DB
- func (db *DB) Agg() *state.AggregatorV3
- func (db *DB) BeginRo(ctx context.Context) (kv.Tx, error)
- func (db *DB) BeginRw(ctx context.Context) (kv.RwTx, error)
- func (db *DB) BeginRwNosync(ctx context.Context) (kv.RwTx, error)
- func (db *DB) BeginTemporalRo(ctx context.Context) (kv.TemporalTx, error)
- func (db *DB) BeginTemporalRw(ctx context.Context) (kv.RwTx, error)
- func (db *DB) BeginTemporalRwNosync(ctx context.Context) (kv.RwTx, error)
- func (db *DB) InternalDB() kv.RwDB
- func (db *DB) Update(ctx context.Context, f func(tx kv.RwTx) error) error
- func (db *DB) UpdateNosync(ctx context.Context, f func(tx kv.RwTx) error) error
- func (db *DB) View(ctx context.Context, f func(tx kv.Tx) error) error
- func (db *DB) ViewTemporal(ctx context.Context, f func(tx kv.TemporalTx) error) error
- type Tx
- func (tx *Tx) Agg() *state.AggregatorV3
- func (tx *Tx) AggCtx() *state.AggregatorV3Context
- func (tx *Tx) Commit() error
- func (tx *Tx) DomainGet(name kv.Domain, key, key2 []byte) (v []byte, ok bool, err error)
- func (tx *Tx) DomainGetAsOf(name kv.Domain, key, key2 []byte, ts uint64) (v []byte, ok bool, err error)
- func (tx *Tx) DomainRange(name kv.Domain, fromKey, toKey []byte, asOfTs uint64, asc order.By, limit int) (it iter.KV, err error)
- func (tx *Tx) HistoryGet(name kv.History, key []byte, ts uint64) (v []byte, ok bool, err error)
- func (tx *Tx) HistoryRange(name kv.History, fromTs, toTs int, asc order.By, limit int) (it iter.KV, err error)
- func (tx *Tx) IndexRange(name kv.InvertedIdx, k []byte, fromTs, toTs int, asc order.By, limit int) (timestamps iter.U64, err error)
- func (tx *Tx) Rollback()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
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 ¶
TODO: it's temporary method, allowing inject TemproalTx without changing code. But it's not type-safe.
func (*DB) BeginTemporalRo ¶
func (*DB) BeginTemporalRwNosync ¶
func (*DB) InternalDB ¶
func (*DB) UpdateNosync ¶
func (*DB) ViewTemporal ¶
type Tx ¶
func (*Tx) Agg ¶
func (tx *Tx) Agg() *state.AggregatorV3
func (*Tx) AggCtx ¶
func (tx *Tx) AggCtx() *state.AggregatorV3Context
func (*Tx) DomainGetAsOf ¶
func (*Tx) DomainRange ¶
func (*Tx) HistoryGet ¶
func (*Tx) HistoryRange ¶
func (*Tx) IndexRange ¶
Click to show internal directories.
Click to hide internal directories.