From 7aaacbf17fc7abe2e504e205f12b020713162ac8 Mon Sep 17 00:00:00 2001 From: Shargon Date: Thu, 16 May 2019 17:10:34 +0200 Subject: [PATCH] Update CoreMetrics.cs --- CoreMetrics/CoreMetrics.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CoreMetrics/CoreMetrics.cs b/CoreMetrics/CoreMetrics.cs index 7800b9131..b9df0022e 100644 --- a/CoreMetrics/CoreMetrics.cs +++ b/CoreMetrics/CoreMetrics.cs @@ -71,10 +71,10 @@ private JObject GetBlocksTime(uint nBlocks, uint lastHeight) uint heightToBegin = lastHeight > 0 ? lastHeight - nBlocks : (Blockchain.Singleton.Height - 1) - nBlocks; for (uint i = heightToBegin; i <= heightToBegin + nBlocks; i++) { - JObject json = new JObject(); Header header = Blockchain.Singleton.Store.GetHeader(i); if (header == null) break; + JObject json = new JObject(); json["timestamp"] = header.Timestamp; json["height"] = i; array.Add(json);