|
|
|
@ -932,17 +932,19 @@ func setupStagedSyncService(node *node.Node, host p2p.Host, hc harmonyconfig.Har |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
sConfig := stagedstreamsync.Config{ |
|
|
|
|
ServerOnly: !hc.Sync.Downloader, |
|
|
|
|
Network: nodeconfig.NetworkType(hc.Network.NetworkType), |
|
|
|
|
Concurrency: hc.Sync.Concurrency, |
|
|
|
|
MinStreams: hc.Sync.MinPeers, |
|
|
|
|
InitStreams: hc.Sync.InitStreams, |
|
|
|
|
MaxAdvertiseWaitTime: hc.Sync.MaxAdvertiseWaitTime, |
|
|
|
|
SmSoftLowCap: hc.Sync.DiscSoftLowCap, |
|
|
|
|
SmHardLowCap: hc.Sync.DiscHardLowCap, |
|
|
|
|
SmHiCap: hc.Sync.DiscHighCap, |
|
|
|
|
SmDiscBatch: hc.Sync.DiscBatch, |
|
|
|
|
LogProgress: node.NodeConfig.LogProgress, |
|
|
|
|
ServerOnly: !hc.Sync.Downloader, |
|
|
|
|
Network: nodeconfig.NetworkType(hc.Network.NetworkType), |
|
|
|
|
Concurrency: hc.Sync.Concurrency, |
|
|
|
|
MinStreams: hc.Sync.MinPeers, |
|
|
|
|
InitStreams: hc.Sync.InitStreams, |
|
|
|
|
MaxAdvertiseWaitTime: hc.Sync.MaxAdvertiseWaitTime, |
|
|
|
|
MaxBlocksPerSyncCycle: hc.Sync.StagedSyncCfg.MaxBlocksPerSyncCycle, |
|
|
|
|
MaxMemSyncCycleSize: hc.Sync.StagedSyncCfg.MaxMemSyncCycleSize, |
|
|
|
|
SmSoftLowCap: hc.Sync.DiscSoftLowCap, |
|
|
|
|
SmHardLowCap: hc.Sync.DiscHardLowCap, |
|
|
|
|
SmHiCap: hc.Sync.DiscHighCap, |
|
|
|
|
SmDiscBatch: hc.Sync.DiscBatch, |
|
|
|
|
LogProgress: node.NodeConfig.LogProgress, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// If we are running side chain, we will need to do some extra works for beacon
|
|
|
|
|