Skip to content

Commit

Permalink
Revert "eth/protocols/snap: fix batch writer when resuming an aborted…
Browse files Browse the repository at this point in the history
… sync (ethereum#27842)"

This reverts commit 5e11ddf.
  • Loading branch information
devopsbo3 authored Nov 10, 2023
1 parent d97e34f commit 35e59ca
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions eth/protocols/snap/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -730,8 +730,6 @@ func (s *Syncer) loadSyncStatus() {
}
s.tasks = progress.Tasks
for _, task := range s.tasks {
task := task // closure for task.genBatch in the stacktrie writer callback

task.genBatch = ethdb.HookedBatch{
Batch: s.db.NewBatch(),
OnPut: func(key []byte, value []byte) {
Expand All @@ -743,8 +741,6 @@ func (s *Syncer) loadSyncStatus() {
})
for accountHash, subtasks := range task.SubTasks {
for _, subtask := range subtasks {
subtask := subtask // closure for subtask.genBatch in the stacktrie writer callback

subtask.genBatch = ethdb.HookedBatch{
Batch: s.db.NewBatch(),
OnPut: func(key []byte, value []byte) {
Expand Down

0 comments on commit 35e59ca

Please sign in to comment.