Skip to content
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
2 changes: 0 additions & 2 deletions src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,6 @@ mantis {
# Sets max number of blocks that can be stored in queue to import on fetcher side
# Warning! This setting affects ability to go back in case of branch resolution so it should not be too low
max-fetcher-queue-size = 1000

use-new-regular-sync = true
}

pruning {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.iohk.ethereum.blockchain.sync

import akka.actor.{Actor, ActorLogging, ActorRef, PoisonPill, Props, Scheduler}
import io.iohk.ethereum.blockchain.sync.regular.{OldRegularSync, RegularSync}
import io.iohk.ethereum.blockchain.sync.regular.RegularSync
import io.iohk.ethereum.consensus.validators.Validators
import io.iohk.ethereum.db.storage.{AppStateStorage, FastSyncStateStorage}
import io.iohk.ethereum.domain.Blockchain
Expand Down Expand Up @@ -85,9 +85,7 @@ class SyncController(
context become runningFastSync(fastSync)
}

def startRegularSync(): Unit = if (syncConfig.useNewRegularSync) startNewRegularSync() else startOldRegularSync()

def startNewRegularSync(): Unit = {
def startRegularSync(): Unit = {
val peersClient = context.actorOf(PeersClient.props(etcPeerManager, peerEventBus, syncConfig, scheduler), "peers-client")
val regularSync = context.actorOf(
RegularSync.props(
Expand All @@ -100,29 +98,12 @@ class SyncController(
ommersPool,
pendingTransactionsManager,
scheduler),
"new-regular-sync"
"regular-sync"
)
regularSync ! RegularSync.Start
context become runningRegularSync(regularSync)
}

def startOldRegularSync(): Unit = {
val regularSync = context.actorOf(OldRegularSync.props(
appStateStorage = appStateStorage,
etcPeerManager = etcPeerManager,
peerEventBus = peerEventBus,
ommersPool = ommersPool,
pendingTransactionsManager = pendingTransactionsManager,
broadcaster = new BlockBroadcast(etcPeerManager, syncConfig),
ledger = ledger,
blockchain = blockchain,
syncConfig = syncConfig,
scheduler = scheduler
), "old-regular-sync")

regularSync ! OldRegularSync.Start
context become runningRegularSync(regularSync)
}
}

object SyncController {
Expand Down
Loading