Skip to content

Commit

Permalink
e3: small rename (erigontech#6734)
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov authored Jan 29, 2023
1 parent 9287a22 commit 44f7ff3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/state/temporal/kv_temporal.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ func (db *DB) BeginTemporalRo(ctx context.Context) (kv.TemporalTx, error) {
tx := &Tx{Tx: kvTx, db: db}

tx.agg = db.agg.MakeContext()
tx.agg.SetTx(kvTx)
return tx, nil
}
func (db *DB) ViewTemporal(ctx context.Context, f func(tx kv.TemporalTx) error) error {
Expand Down Expand Up @@ -270,7 +269,7 @@ func (tx *Tx) DomainGet(name kv.Domain, key, key2 []byte, ts uint64) (v []byte,
func (tx *Tx) HistoryGet(name kv.History, key []byte, ts uint64) (v []byte, ok bool, err error) {
switch name {
case AccountsHistory:
v, ok, err = tx.agg.ReadAccountDataNoStateWithRecent(key, ts)
v, ok, err = tx.agg.ReadAccountDataNoStateWithRecent(key, ts, tx.Tx)
if err != nil {
return nil, false, err
}
Expand All @@ -297,9 +296,9 @@ func (tx *Tx) HistoryGet(name kv.History, key []byte, ts uint64) (v []byte, ok b
}
return v, true, nil
case StorageHistory:
return tx.agg.ReadAccountStorageNoStateWithRecent2(key, ts)
return tx.agg.ReadAccountStorageNoStateWithRecent2(key, ts, tx.Tx)
case CodeHistory:
return tx.agg.ReadAccountCodeNoStateWithRecent(key, ts)
return tx.agg.ReadAccountCodeNoStateWithRecent(key, ts, tx.Tx)
default:
panic(fmt.Sprintf("unexpected: %s", name))
}
Expand Down

0 comments on commit 44f7ff3

Please sign in to comment.