From f792736b50d0ed9c2900bc6029d0dbb23316aea4 Mon Sep 17 00:00:00 2001 From: ZeljkoBenovic <47507986+ZeljkoBenovic@users.noreply.github.com> Date: Fri, 1 Nov 2024 10:08:18 +0100 Subject: [PATCH] add number conversion for best --- lib/history.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/history.js b/lib/history.js index 6afaf11..a827fc2 100644 --- a/lib/history.js +++ b/lib/history.js @@ -644,7 +644,7 @@ History.prototype.getHistoryRequestRange = function() var blocks = _.map( this._items, 'height' ); var best = _.max( blocks ); - var range = _.range( _.max([ 0, best - MAX_HISTORY ]), best + 1); + var range = _.range( _.max([ 0, Number(best) - MAX_HISTORY ]), Number(best) + 1); var missing = _.difference( range, blocks );