Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed Nov 8, 2024
1 parent 205368b commit e944060
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion erigon-lib/state/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -2413,7 +2413,7 @@ func (hi *DomainLatestIterFile) Next() ([]byte, []byte, error) {
return nil, nil, err
}
order.Asc.Assert(hi.kBackup, hi.nextKey)
// TODO: remove `common.Copy`. it protecting from some existing bug.
// TODO: remove `common.Copy`. it protecting from some existing bug. https://github.com/erigontech/erigon/issues/12672
return common.Copy(hi.kBackup), common.Copy(hi.vBackup), nil
}

Expand Down
6 changes: 4 additions & 2 deletions erigon-lib/state/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,8 @@ func (hi *StateAsOfIterF) Next() ([]byte, []byte, error) {
return nil, nil, err
}
hi.orderAscend.Assert(hi.kBackup, hi.nextKey)
return hi.kBackup, hi.vBackup, nil
// TODO: remove `common.Copy`. it protecting from some existing bug. https://github.com/erigontech/erigon/issues/12672
return common.Copy(hi.kBackup), common.Copy(hi.vBackup), nil
}

// StateAsOfIterDB - returns state range at given time in history
Expand Down Expand Up @@ -1691,7 +1692,8 @@ func (hi *StateAsOfIterDB) Next() ([]byte, []byte, error) {
return nil, nil, err
}
hi.orderAscend.Assert(hi.kBackup, hi.nextKey)
return hi.kBackup, hi.vBackup, nil
// TODO: remove `common.Copy`. it protecting from some existing bug. https://github.com/erigontech/erigon/issues/12672
return common.Copy(hi.kBackup), common.Copy(hi.vBackup), nil
}

func (ht *HistoryRoTx) iterateChangedFrozen(fromTxNum, toTxNum int, asc order.By, limit int) (stream.KV, error) {
Expand Down

0 comments on commit e944060

Please sign in to comment.