@inject BTCPayServer.HostedServices.NBXplorerDashboard dashboard;
@foreach (var line in dashboard.GetAll().Where(summary => summary.Network.ShowSyncSummary))
{
@line.Network.CryptoCode
@if (line.Status == null)
{
- The node is offline
@if (line.Error != null)
{
- Last error: @line.Error
}
}
else
{
- NBXplorer headers height: @line.Status.ChainHeight
@if (line.Status.BitcoinStatus == null)
{
if (line.State == BTCPayServer.HostedServices.NBXplorerState.Synching)
{
- The node is starting...
}
else
{
- The node is offline
@if (line.Error != null)
{
- Last error: @line.Error
}
}
}
else if (line.Status.BitcoinStatus.IsSynched)
{
- The node is synchronized (Height: @line.Status.BitcoinStatus.Headers)
@if (line.Status.BitcoinStatus.IsSynched &&
line.Status.SyncHeight.HasValue &&
line.Status.SyncHeight.Value < line.Status.BitcoinStatus.Headers)
{
- NBXplorer is synchronizing... (Height: @line.Status.SyncHeight.Value)
}
}
else
{
- Node headers height: @line.Status.BitcoinStatus.Headers
- Validated blocks: @line.Status.BitcoinStatus.Blocks
}
@if (!line.Status.IsFullySynched && line.Status.BitcoinStatus != null)
{
@((int) (line.Status.BitcoinStatus.VerificationProgress * 100))%
}
}
}