We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8224bb9 commit 6e934f4Copy full SHA for 6e934f4
eth/protocols/snap/sync.go
@@ -730,6 +730,8 @@ func (s *Syncer) loadSyncStatus() {
730
}
731
s.tasks = progress.Tasks
732
for _, task := range s.tasks {
733
+ task := task // closure for task.genBatch in the stacktrie writer callback
734
+
735
task.genBatch = ethdb.HookedBatch{
736
Batch: s.db.NewBatch(),
737
OnPut: func(key []byte, value []byte) {
@@ -741,6 +743,8 @@ func (s *Syncer) loadSyncStatus() {
741
743
})
742
744
for accountHash, subtasks := range task.SubTasks {
745
for _, subtask := range subtasks {
746
+ subtask := subtask // closure for subtask.genBatch in the stacktrie writer callback
747
748
subtask.genBatch = ethdb.HookedBatch{
749
750
0 commit comments