1
1
package io .iohk .ethereum .blockchain .sync
2
2
3
3
import akka .actor .{Actor , ActorLogging , ActorRef , PoisonPill , Props , Scheduler }
4
- import io .iohk .ethereum .blockchain .sync .regular .{ OldRegularSync , RegularSync }
4
+ import io .iohk .ethereum .blockchain .sync .regular .RegularSync
5
5
import io .iohk .ethereum .consensus .validators .Validators
6
6
import io .iohk .ethereum .db .storage .{AppStateStorage , FastSyncStateStorage }
7
7
import io .iohk .ethereum .domain .Blockchain
@@ -85,9 +85,7 @@ class SyncController(
85
85
context become runningFastSync(fastSync)
86
86
}
87
87
88
- def startRegularSync (): Unit = if (syncConfig.useNewRegularSync) startNewRegularSync() else startOldRegularSync()
89
-
90
- def startNewRegularSync (): Unit = {
88
+ def startRegularSync (): Unit = {
91
89
val peersClient = context.actorOf(PeersClient .props(etcPeerManager, peerEventBus, syncConfig, scheduler), " peers-client" )
92
90
val regularSync = context.actorOf(
93
91
RegularSync .props(
@@ -100,29 +98,12 @@ class SyncController(
100
98
ommersPool,
101
99
pendingTransactionsManager,
102
100
scheduler),
103
- " new- regular-sync"
101
+ " regular-sync"
104
102
)
105
103
regularSync ! RegularSync .Start
106
104
context become runningRegularSync(regularSync)
107
105
}
108
106
109
- def startOldRegularSync (): Unit = {
110
- val regularSync = context.actorOf(OldRegularSync .props(
111
- appStateStorage = appStateStorage,
112
- etcPeerManager = etcPeerManager,
113
- peerEventBus = peerEventBus,
114
- ommersPool = ommersPool,
115
- pendingTransactionsManager = pendingTransactionsManager,
116
- broadcaster = new BlockBroadcast (etcPeerManager, syncConfig),
117
- ledger = ledger,
118
- blockchain = blockchain,
119
- syncConfig = syncConfig,
120
- scheduler = scheduler
121
- ), " old-regular-sync" )
122
-
123
- regularSync ! OldRegularSync .Start
124
- context become runningRegularSync(regularSync)
125
- }
126
107
}
127
108
128
109
object SyncController {
0 commit comments