From 4ff93746a02525e66f8485f7747a875ea87166da Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 4 Nov 2017 12:13:53 -0700 Subject: [PATCH] http: fix block call. --- lib/http/server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/http/server.js b/lib/http/server.js index 23fb3d97..1079ce3e 100644 --- a/lib/http/server.js +++ b/lib/http/server.js @@ -279,9 +279,9 @@ HTTPServer.prototype.initRouter = function initRouter() { } const height = await this.chain.getHeight(hash); - const confirmations = this.chain.height - height; + const depth = this.chain.height - height + 1; - res.send(200, block.getJSON(this.network, view, height, confirmations)); + res.send(200, block.getJSON(this.network, view, height, depth)); }); // Mempool snapshot