diff --git a/lib/bcoin/pool.js b/lib/bcoin/pool.js index 3a267197..699d98ac 100644 --- a/lib/bcoin/pool.js +++ b/lib/bcoin/pool.js @@ -1214,6 +1214,7 @@ Pool.prototype.search = function search(id, range, e) { // chain by default if (!range.end) range.end = utils.now(); + if (!range.start) range.start = utils.now() - 432000; @@ -1255,14 +1256,11 @@ Pool.prototype.search = function search(id, range, e) { timeout = setTimeout(done.bind(null, true), total); - this.chain.resetTime(range.start); - - this.stopSync(); - - if (this.peers.load) - this.peers.load.destroy(); - - this.startSync(); + if (range.start < this.chain.getTip().ts) { + this.chain.resetTime(range.start); + this.stopSync(); + this.startSync(); + } return e; };