[downloader] adjust default testnet downloader values, add sleep to unsuccessful download

pull/4049/head
Jacky Wang 3 years ago
parent 8f24ee77b2
commit 6e52ad4a88
No known key found for this signature in database
GPG Key ID: 1085CE5F4FF5842C
  1. 24
      cmd/harmony/default.go
  2. 1
      hmy/downloader/downloader.go
  3. 1
      p2p/stream/common/streammanager/streammanager.go

@ -139,25 +139,25 @@ var (
defaultTestNetSyncConfig = harmonyconfig.SyncConfig{
Enabled: true,
Downloader: false,
Concurrency: 4,
MinPeers: 4,
InitStreams: 4,
DiscSoftLowCap: 4,
DiscHardLowCap: 4,
Concurrency: 2,
MinPeers: 2,
InitStreams: 2,
DiscSoftLowCap: 2,
DiscHardLowCap: 2,
DiscHighCap: 1024,
DiscBatch: 8,
DiscBatch: 3,
}
defaultLocalNetSyncConfig = harmonyconfig.SyncConfig{
Enabled: true,
Downloader: true,
Concurrency: 4,
MinPeers: 4,
InitStreams: 4,
DiscSoftLowCap: 4,
DiscHardLowCap: 4,
Concurrency: 2,
MinPeers: 2,
InitStreams: 2,
DiscSoftLowCap: 2,
DiscHardLowCap: 2,
DiscHighCap: 1024,
DiscBatch: 8,
DiscBatch: 3,
}
defaultElseSyncConfig = harmonyconfig.SyncConfig{

@ -203,6 +203,7 @@ func (d *Downloader) loop() {
time.Sleep(5 * time.Second)
trigger()
}()
time.Sleep(1 * time.Second)
continue
}
d.logger.Info().Int("block added", addedBN).

@ -125,6 +125,7 @@ func (sm *streamManager) loop() {
case <-sm.discCh:
if sm.coolDown.IsSet() {
sm.logger.Info().Msg("skipping discover for cool down")
continue
}
if discCancel != nil {

Loading…
Cancel
Save