get rid of getStartHeight.
This commit is contained in:
parent
27fd056316
commit
486c22d0e7
@ -577,10 +577,6 @@ Chain.prototype.hashRange = function hashRange(start, end) {
|
|||||||
return hashes;
|
return hashes;
|
||||||
};
|
};
|
||||||
|
|
||||||
Chain.prototype.getStartHeight = function getStartHeight() {
|
|
||||||
return this.index.entries[this.index.entries.length - 1].height;
|
|
||||||
};
|
|
||||||
|
|
||||||
Chain.prototype.locatorHashes = function locatorHashes(start) {
|
Chain.prototype.locatorHashes = function locatorHashes(start) {
|
||||||
var chain = this.index.hashes;
|
var chain = this.index.hashes;
|
||||||
var hashes = [];
|
var hashes = [];
|
||||||
|
|||||||
@ -141,7 +141,7 @@ Peer.prototype._init = function init() {
|
|||||||
this.once('version', function() {
|
this.once('version', function() {
|
||||||
self.pool.emit('debug',
|
self.pool.emit('debug',
|
||||||
'Sent version (%s): height=%s',
|
'Sent version (%s): height=%s',
|
||||||
self.host, this.pool.chain.getStartHeight());
|
self.host, this.pool.chain.height());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ Peer.prototype._init = function init() {
|
|||||||
|
|
||||||
// Send hello
|
// Send hello
|
||||||
this._write(this.framer.version({
|
this._write(this.framer.version({
|
||||||
height: this.pool.chain.getStartHeight(),
|
height: this.pool.chain.height(),
|
||||||
relay: this.options.relay
|
relay: this.options.relay
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user