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

Commit

Permalink
0.5.0-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dkackman committed Sep 17, 2021
1 parent 7f3875e commit d509d56
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/rchia/Show/ShowTasks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,29 +149,28 @@ public async Task State()

if (state.Sync.Synced)
{
ConsoleMessage.NameValue("Current Blockchain Status", "Full Node Synced");
ConsoleMessage.NameValue("Current Blockchain Status", "[green]Full Node Synced[/]");
ConsoleMessage.NameValue("Peak Hash", peakHash);
}
else if (state.Peak is not null && state.Sync.SyncMode)
{
ConsoleMessage.NameValue("Current Blockchain Status", $"Syncing {state.Sync.SyncProgressHeight}/{state.Sync.SyncTipHeight}.");
ConsoleMessage.NameValue("Current Blockchain Status", $"[yellow]Syncing[/] {state.Sync.SyncProgressHeight}/{state.Sync.SyncTipHeight}");
ConsoleMessage.NameValue("Peak Hash", peakHash.Replace("0x", ""));
}
else if (state.Peak is not null)
{
ConsoleMessage.NameValue("Current Blockchain Status", $"Not Synced. Peak height: {state.Peak.Height}");
ConsoleMessage.NameValue("Current Blockchain Status", $"[red]Not Synced[/] Peak height: {state.Peak.Height}");
}
else
{
ConsoleMessage.WriteLine("Searching for an initial chain");
ConsoleMessage.Warning("Searching for an initial chain");
ConsoleMessage.MarkupLine("You may be able to expedite with '[grey]rchia show -a host:port[/]' using a known node.");
}

if (state.Peak is not null)
{
var time = state.Peak.DateTimestamp.HasValue ? state.Peak.DateTimestamp.Value.ToLocalTime().ToString("U") : "unknown";
ConsoleMessage.MarkupLine($" [wheat1]Time:[/] {time}\t\t[wheat1]Height[/]:\t{state.Peak.Height}");

}

ConsoleMessage.WriteLine("");
Expand Down

0 comments on commit d509d56

Please sign in to comment.