Skip to content

Commit

Permalink
Nako sync progress in stats
Browse files Browse the repository at this point in the history
  • Loading branch information
dangershony committed Jul 5, 2016
1 parent 067c484 commit 13d3080
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Api/Handlers/StatsHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public async Task<Statistics> Statistics()
stats.ClientInfo = await client.GetInfoAsync();
stats.TransactionsInPool = this.storage.GetMemoryTransactions().Count();
stats.SyncBlockIndex = this.storage.BlockGetBlockCount(1).First().BlockIndex;

stats.Progress = $"{stats.SyncBlockIndex}/{stats.ClientInfo.Blocks} - {stats.ClientInfo.Blocks - stats.SyncBlockIndex}";
return stats;
}

Expand Down
5 changes: 5 additions & 0 deletions src/Api/Handlers/Types/Statistics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ public class Statistics
/// </summary>
public string CoinTag { get; set; }

/// <summary>
/// Gets or sets the sync progress.
/// </summary>
public string Progress { get; set; }

/// <summary>
/// Gets or sets the number of transactions in pool.
/// </summary>
Expand Down

0 comments on commit 13d3080

Please sign in to comment.