Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Commit

Permalink
Merge branch 'i141' of github.com:ScorexFoundation/Scorex into i141
Browse files Browse the repository at this point in the history
  • Loading branch information
kushti committed Oct 22, 2020
2 parents c1733b2 + 113e14b commit e3140f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/scorex/core/network/NetworkController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class NetworkController(settings: NetworkSettings,

// Update last seen message timestamps, global and peer's, with the message timestamp
val remoteAddress = remote.connectionId.remoteAddress
connections.get(remote.connectionId.remoteAddress) match {
connections.get(remoteAddress) match {
case Some(cp) => cp.peerInfo match {
case Some(pi) =>
val now = networkTime()
Expand Down Expand Up @@ -543,4 +543,4 @@ object NetworkControllerRef {
props(settings, peerManagerRef, scorexContext, IO(Tcp)),
name)
}
}
}
7 changes: 5 additions & 2 deletions src/main/scala/scorex/core/validation/ModifierError.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package scorex.core.validation

import scala.util.control.NoStackTrace

/** Base trait for errors that were occurred during NodeView Modifier validation
*/
trait ModifierError {
Expand All @@ -22,11 +24,12 @@ class MalformedModifierError(val message: String, cause: Option[Throwable] = Non
def toThrowable: Throwable = this
}

/** Temporary modifier error that may be recovered in future after some history updates
/** Temporary modifier error that may be recovered in future after some history updates.
* When an instance is created, the stack trace is not collected which makes this exception lightweight.
*/
@SuppressWarnings(Array("org.wartremover.warts.Null"))
class RecoverableModifierError(val message: String, cause: Option[Throwable] = None)
extends Exception(message, cause.orNull) with ModifierError {
extends Exception(message, cause.orNull) with ModifierError with NoStackTrace {
def isFatal: Boolean = false
def toThrowable: Throwable = this
}
Expand Down

0 comments on commit e3140f6

Please sign in to comment.