pool: minor.

This commit is contained in:
Christopher Jeffrey 2017-01-20 16:49:55 -08:00
parent 170d9a1416
commit 0c055ba236
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -1563,8 +1563,8 @@ Pool.prototype._handleHeaders = co(function* handleHeaders(peer, packet) {
for (i = 0; i < headers.length; i++) {
header = headers[i];
hash = header.hash('hex');
last = this.headerChain.tail;
hash = header.hash('hex');
height = last.height + 1;
if (header.prevBlock !== last.hash) {
@ -1580,7 +1580,7 @@ Pool.prototype._handleHeaders = co(function* handleHeaders(peer, packet) {
return;
}
node = new BlockNode(hash, last.height + 1);
node = new BlockNode(hash, height);
if (!this.headerNext)
this.headerNext = node;