Skip to content

Commit d4c5c3c

Browse files
db/state/execctx: use HistoryKeyTxNumRange in touchChangedKeys (#20229)
- `touchChangedKeys` only needs keys, not values — switch from `HistoryRange` (returns key+value) to `tx.Debug().HistoryKeyTxNumRange` (returns key+txNum) to avoid fetching unnecessary value data
1 parent 804b7a1 commit d4c5c3c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

db/state/execctx/domain_shared.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ func (sd *SharedDomains) TouchChangedKeysFromHistory(tx kv.TemporalTx, fromTxNum
746746
// touches them onto the commitment trie.
747747
func (sd *SharedDomains) touchChangedKeys(tx kv.TemporalTx, d kv.Domain, fromTxNum uint64, toTxNum uint64) (int, error) {
748748
changes := 0
749-
it, err := tx.HistoryRange(d, int(fromTxNum), int(toTxNum), order.Asc, -1)
749+
it, err := tx.Debug().HistoryKeyTxNumRange(d, int(fromTxNum), int(toTxNum), order.Asc, -1)
750750
if err != nil {
751751
return changes, err
752752
}

0 commit comments

Comments
 (0)