From c560ae3cff9733aef18a8a6d2f6c41f32adbb95d Mon Sep 17 00:00:00 2001 From: tenthirtyone Date: Wed, 23 Aug 2017 11:17:49 -0400 Subject: [PATCH] fix bestHeight bug --- server/lib/db/blocks.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server/lib/db/blocks.js b/server/lib/db/blocks.js index 623dcde..e4536bd 100644 --- a/server/lib/db/blocks.js +++ b/server/lib/db/blocks.js @@ -9,6 +9,7 @@ let bestBlockHeight = 0; // 1e9 limit = ~2M years from now // Mostly for sync to set height function bestHeight(height) { + height = parseInt(height, 10) || 0; if (Number.isInteger(height) && height > 0 && height < 1 * 1e9) {