Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix syntax issue in stream sync #4714

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions api/service/stagedstreamsync/staged_stream_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ func (s *StagedStreamSync) cleanUp(ctx context.Context, fromStage int, db kv.RwD
continue
}
if err := s.pruneStage(ctx, firstCycle, s.pruningOrder[i], db, tx); err != nil {
utils.Logger().Error().Err(err).
Interface("stage id", s.pruningOrder[i].ID).
Msgf(WrapStagedSyncMsg("stage cleanup failed"))
panic(err)
}
}
Expand Down
4 changes: 2 additions & 2 deletions api/service/stagedstreamsync/state_sync_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ func (s *FullStateDownloadManager) cleanAccountTasks() {
return
}
// Sync wasn't finished previously, check for any task that can be finalized
for taskID, _ := range s.tasks.accountTasks {
for taskID := range s.tasks.accountTasks {
if s.tasks.accountTasks[taskID].done {
s.tasks.deleteAccountTask(taskID)
}
Expand Down Expand Up @@ -2333,7 +2333,7 @@ func (s *FullStateDownloadManager) onHealByteCodes(task *healTask,
Msg("Delivering set of healing bytecodes")

s.lock.Lock()
s.lock.Unlock()
defer s.lock.Unlock()

// Response is valid, but check if peer is signalling that it does not have
// the requested data. For bytecode range queries that means the peer is not
Expand Down