Skip to content

Commit 13d3080

Browse files
committed
Nako sync progress in stats
1 parent 067c484 commit 13d3080

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Api/Handlers/StatsHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public async Task<Statistics> Statistics()
6363
stats.ClientInfo = await client.GetInfoAsync();
6464
stats.TransactionsInPool = this.storage.GetMemoryTransactions().Count();
6565
stats.SyncBlockIndex = this.storage.BlockGetBlockCount(1).First().BlockIndex;
66-
66+
stats.Progress = $"{stats.SyncBlockIndex}/{stats.ClientInfo.Blocks} - {stats.ClientInfo.Blocks - stats.SyncBlockIndex}";
6767
return stats;
6868
}
6969

src/Api/Handlers/Types/Statistics.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ public class Statistics
2525
/// </summary>
2626
public string CoinTag { get; set; }
2727

28+
/// <summary>
29+
/// Gets or sets the sync progress.
30+
/// </summary>
31+
public string Progress { get; set; }
32+
2833
/// <summary>
2934
/// Gets or sets the number of transactions in pool.
3035
/// </summary>

0 commit comments

Comments
 (0)