From 51e271fe0d1fd97947be3c6ac6e46fcc7b6d561f Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 16 Nov 2016 10:03:03 -0800 Subject: [PATCH] http: allow hash/height mixup. --- lib/http/server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/http/server.js b/lib/http/server.js index 6390c047..04f9d4ec 100644 --- a/lib/http/server.js +++ b/lib/http/server.js @@ -245,7 +245,9 @@ HTTPServer.prototype._init = function _init() { options.id = params.id; } - if (params.hash) { + if (utils.isUInt32(params.hash)) { + options.height = params.hash; + } else if (params.hash) { enforce(typeof params.hash === 'string', 'Hash must be a string.'); if (params.hash.length !== 64) { options.height = Number(params.hash);