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

Commit f6855bf

Browse files
committed
getStatus
1 parent a6fe141 commit f6855bf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/scala/scorex/core/network/SyncTracker.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ class SyncTracker(nvsRef: ActorRef,
5151
if (stableSyncRegime) networkSettings.syncIntervalStable
5252
else networkSettings.syncInterval
5353

54+
/**
55+
* Get synchronization status for given connected peer
56+
*/
57+
def getStatus(peer: ConnectedPeer): Option[HistoryComparisonResult] = {
58+
statuses.get(peer)
59+
}
60+
5461
def updateStatus(peer: ConnectedPeer, status: HistoryComparisonResult): Unit = {
5562
val seniorsBefore = numOfSeniors()
5663
statuses += peer -> status

0 commit comments

Comments
 (0)