Skip to content

Commit

Permalink
fix docker
Browse files Browse the repository at this point in the history
  • Loading branch information
GusevTimofey committed Mar 5, 2019
1 parent 09cb63e commit 042f77f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/scala/encry/network/DeliveryManager.scala
Expand Up @@ -78,14 +78,18 @@ class DeliveryManager(influxRef: Option[ActorRef],
if (delivered.contains(key(modifierId))) delivered -= key(modifierId)
else reexpect(peer, modifierTypeId, modifierId)
case CheckModifiersToDownload =>
logger.info(s"CheckModifiersToDownload request before hitory opt")
historyReaderOpt.foreach { h =>
logger.info(s"CheckModifiersToDownload request AFTER hitory opt")
logger.info(s"CheckModifiersToDownload requestedModifiers size ${requestedModifiers.size}")
val currentQueue: HashSet[ModifierId] =
requestedModifiers.flatMap { case (_, modIds) =>
modIds.keys.map(modId => ModifierId @@ modId.toArray)
}.to[HashSet]
val newIds: Seq[(ModifierTypeId, ModifierId)] =
h.modifiersToDownload(settings.network.networkChunkSize - currentQueue.size, currentQueue)
.filterNot(modId => currentQueue.contains(modId._2))
logger.info(s"CheckModifiersToDownload newIds size ${newIds.size}")
if (newIds.nonEmpty) newIds.groupBy(_._1).foreach {
case (modId: ModifierTypeId, ids: Seq[(ModifierTypeId, ModifierId)]) => requestDownload(modId, ids.map(_._2))
}
Expand Down

0 comments on commit 042f77f

Please sign in to comment.