Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed May 2, 2023
1 parent 524ad2c commit 784c58a
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions state/aggregator_v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -952,20 +952,20 @@ func (a *AggregatorV3) Unwind(ctx context.Context, txUnwindTo uint64, stateLoad
return err
}
}
{
exists := map[string]struct{}{}
if err := a.commitment.pruneF(txUnwindTo, math2.MaxUint64, func(txNum uint64, k, v []byte) error {
if _, ok := exists[string(k)]; ok {
return nil
}
exists[string(k)] = struct{}{}

a.commitment.SetTxNum(txNum)
return a.commitment.put(k, v)
}); err != nil {
return err
}
}
//{
// exists := map[string]struct{}{}
// if err := a.commitment.pruneF(txUnwindTo, math2.MaxUint64, func(txNum uint64, k, v []byte) error {
// if _, ok := exists[string(k)]; ok {
// return nil
// }
// exists[string(k)] = struct{}{}
//
// a.commitment.SetTxNum(txNum)
// return a.commitment.put(k, v)
// }); err != nil {
// return err
// }
//}

//if err := stateChanges.Load(a.rwTx, kv.PlainState, stateLoad, etl.TransformArgs{Quit: ctx.Done()}); err != nil {
// return err
Expand Down

0 comments on commit 784c58a

Please sign in to comment.