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);