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 2, 2023
1 parent 96412fa commit 53fb56a
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 @@ -370,6 +370,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 53fb56a

Please sign in to comment.