Skip to content

Commit

Permalink
fix issue from runnig sync loop while stream sync is runing
Browse files Browse the repository at this point in the history
  • Loading branch information
GheisMohammadi committed Aug 3, 2023
1 parent cfa06d4 commit a5634ed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions node/node_syncing.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,11 @@ func (node *Node) supportSyncing() {
go node.SendNewBlockToUnsync()
}

// if stream sync client is running, don't create other sync client instances
if node.HarmonyConfig.Sync.Downloader {
return
}

if !node.NodeConfig.StagedSync && node.stateSync == nil {
node.stateSync = node.createStateSync(node.Blockchain())
utils.Logger().Debug().Msg("[SYNC] initialized state sync")
Expand Down

0 comments on commit a5634ed

Please sign in to comment.