Skip to content

Commit

Permalink
http: fix block call.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Nov 4, 2017
1 parent bab42bb commit 4ff9374
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/http/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4ff9374

Please sign in to comment.