Skip to content

Commit

Permalink
avoiding v1SyncInfo recalc
Browse files Browse the repository at this point in the history
  • Loading branch information
kushti committed Jan 4, 2022
1 parent c3cee36 commit 136e8fc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ class ErgoNodeViewSynchronizer(networkControllerRef: ActorRef,
val (peersV2, peersV1) = peers.partition(p => syncV2Supported(p))
log.debug(s"Syncing with ${peersV1.size} peers via sync v1, ${peersV2.size} peers via sync v2")
if (peersV1.nonEmpty) {
networkControllerRef ! SendToNetwork(Message(syncInfoSpec, Right(history.syncInfoV1), None), SendToPeers(peersV1))
val v1SyncInfo = history.syncInfoV1
networkControllerRef ! SendToNetwork(Message(syncInfoSpec, Right(v1SyncInfo), None), SendToPeers(peersV1))
}
if (peersV2.nonEmpty) {
//todo: send only last header to peers which are equal or younger
Expand Down

0 comments on commit 136e8fc

Please sign in to comment.