Documentation ¶
Index ¶
- Constants
- 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) 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 ¶
View Source
const ( AccountsDomain kv.Domain = "AccountsDomain" StorageDomain kv.Domain = "StorageDomain" CodeDomain kv.Domain = "CodeDomain" )
View Source
const ( AccountsHistory kv.History = "AccountsHistory" StorageHistory kv.History = "StorageHistory" CodeHistory kv.History = "CodeHistory" )
View Source
const ( AccountsHistoryIdx kv.InvertedIdx = "AccountsHistoryIdx" StorageHistoryIdx kv.InvertedIdx = "StorageHistoryIdx" CodeHistoryIdx kv.InvertedIdx = "CodeHistoryIdx" LogTopicIdx kv.InvertedIdx = "LogTopicIdx" LogAddrIdx kv.InvertedIdx = "LogAddrIdx" TracesFromIdx kv.InvertedIdx = "TracesFromIdx" TracesToIdx kv.InvertedIdx = "TracesToIdx" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
func New ¶
func New(db kv.RwDB, agg *state.AggregatorV3, cb1 tConvertV3toV2, cb2 tRestoreCodeHash, cb3 tParseIncarnation, 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) 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.