Skip to content

Commit

Permalink
fix(BlockStream): fix emitted block heights being off by 1
Browse files Browse the repository at this point in the history
  • Loading branch information
mappum committed Jan 14, 2016
1 parent 5da81a9 commit eba2aea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/blockStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ BlockStream.prototype._next = function () {
this.chain.getBlock(this.requestCursor, function (err, block) {
if (err) return self._error(err)
var hash = u.toHash(block.header.hash)
if (self.requestHeight == null) self.requestHeight = block.height + 1
if (self.requestHeight == null) self.requestHeight = block.height
self.requestQueue.push(hash)
self._getData(block)
if (!block.next) {
Expand Down

0 comments on commit eba2aea

Please sign in to comment.