Skip to content

Commit 5ca2bf8

Browse files
authored
Remove legacy sync (#2237)
1 parent 709200f commit 5ca2bf8

File tree

3 files changed

+4
-1119
lines changed

3 files changed

+4
-1119
lines changed

nimbus/nimbus.nim

+4-7
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,9 @@ proc setupP2P(nimbus: NimbusNode, conf: NimbusConf,
164164
nimbus.ethNode, nimbus.chainRef, nimbus.ctx.rng, conf.maxPeers,
165165
)
166166
else:
167-
nimbus.legaSyncRef = LegacySyncRef.new(
168-
nimbus.ethNode, nimbus.chainRef)
167+
nimbus.fullSyncRef = FullSyncRef.init(
168+
nimbus.ethNode, nimbus.chainRef, nimbus.ctx.rng, conf.maxPeers,
169+
tickerOK, exCtrlFile)
169170

170171
# Connect directly to the static nodes
171172
let staticPeers = conf.getStaticPeers()
@@ -271,11 +272,7 @@ proc start(nimbus: NimbusNode, conf: NimbusConf) =
271272
if com.forkGTE(MergeFork):
272273
nimbus.beaconSyncRef.start
273274
else:
274-
nimbus.legaSyncRef.start
275-
nimbus.ethNode.setEthHandlerNewBlocksAndHashes(
276-
legacy.newBlockHandler,
277-
legacy.newBlockHashesHandler,
278-
cast[pointer](nimbus.legaSyncRef))
275+
nimbus.fullSyncRef.start
279276
of SyncMode.Full:
280277
nimbus.fullSyncRef.start
281278
#of SyncMode.Snap:

nimbus/nimbus_desc.nim

-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import
1616
./core/tx_pool,
1717
./sync/peers,
1818
./sync/beacon,
19-
./sync/legacy,
2019
# ./sync/snap, # -- todo
2120
./sync/full,
2221
./beacon/beacon_engine,
@@ -32,7 +31,6 @@ export
3231
tx_pool,
3332
peers,
3433
beacon,
35-
legacy,
3634
#snap,
3735
full,
3836
beacon_engine,
@@ -53,7 +51,6 @@ type
5351
txPool*: TxPoolRef
5452
networkLoop*: Future[void]
5553
peerManager*: PeerManagerRef
56-
legaSyncRef*: LegacySyncRef
5754
# snapSyncRef*: SnapSyncRef # -- todo
5855
fullSyncRef*: FullSyncRef
5956
beaconSyncRef*: BeaconSyncRef

0 commit comments

Comments
 (0)