Skip to content

Commit

Permalink
Merge pull request #2053 from ergoplatform/v5.0.15
Browse files Browse the repository at this point in the history
Fix for updating lastStoredActivityTime in in-memory connected peers
  • Loading branch information
kushti authored Oct 20, 2023
2 parents b2bd8d4 + df6626c commit 85dfd1a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/scala/scorex/core/network/NetworkController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ class NetworkController(ergoSettings: ErgoSettings,
cp.peerInfo.foreach { peerInfo =>
if ((now - peerInfo.lastStoredActivityTime) > activityDelta) {
val peerInfoUpdated = peerInfo.copy(lastStoredActivityTime = now)
connections += remoteAddress -> cp.copy(peerInfo = Some(peerInfoUpdated))
peerManagerRef ! AddOrUpdatePeer(peerInfoUpdated)
}
}
Expand Down

0 comments on commit 85dfd1a

Please sign in to comment.