diff --git a/lib/bcoin/chain.js b/lib/bcoin/chain.js index 88551ecc..cce5b0f9 100644 --- a/lib/bcoin/chain.js +++ b/lib/bcoin/chain.js @@ -342,7 +342,7 @@ Chain.prototype.isFull = function isFull() { Chain.prototype.fillPercent = function fillPercent() { var total = (+new Date() / 1000 - 40 * 60) - this.index.lastTs; var current = this.index.ts[this.index.ts.length - 1] - this.index.lastTs; - return Math.min(0, Math.max(current / total, 1)); + return Math.max(0, Math.min(current / total, 1)); }; Chain.prototype.hashesInRange = function hashesInRange(start, end, cb) {