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;
|
||||
};
|
||||
|
||||
Chain.prototype.getStartHeight = function getStartHeight() {
|
||||
return this.index.entries[this.index.entries.length - 1].height;
|
||||
};
|
||||
|
||||
Chain.prototype.locatorHashes = function locatorHashes(start) {
|
||||
var chain = this.index.hashes;
|
||||
var hashes = [];
|
||||
|
||||
@ -141,7 +141,7 @@ Peer.prototype._init = function init() {
|
||||
this.once('version', function() {
|
||||
self.pool.emit('debug',
|
||||
'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
|
||||
this._write(this.framer.version({
|
||||
height: this.pool.chain.getStartHeight(),
|
||||
height: this.pool.chain.height(),
|
||||
relay: this.options.relay
|
||||
}));
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user