http: allow hash/height mixup.
This commit is contained in:
parent
f6c09af49f
commit
51e271fe0d
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user