http: minor.
This commit is contained in:
parent
60eec9e0a0
commit
f297591193
@ -93,6 +93,7 @@ HTTPServer.prototype._init = function _init() {
|
||||
this.server.on('request', function(req, res) {
|
||||
if (req.pathname === '/')
|
||||
return;
|
||||
|
||||
self.logger.debug('Request for path=%s (%s).',
|
||||
req.pathname, req.socket.remoteAddress);
|
||||
});
|
||||
@ -285,6 +286,8 @@ HTTPServer.prototype._init = function _init() {
|
||||
for (i = 0; i < params.outputs.length; i++) {
|
||||
output = params.outputs[i];
|
||||
|
||||
assert(output && typeof output === 'object', 'Output must be an object.');
|
||||
|
||||
if (output.address)
|
||||
assert(typeof output.address === 'string', 'Address must be a string.');
|
||||
else if (output.script)
|
||||
@ -365,8 +368,8 @@ HTTPServer.prototype._init = function _init() {
|
||||
}
|
||||
|
||||
if (params.token) {
|
||||
assert(utils.isHex(params.token), 'API key must be a hex string.');
|
||||
assert(params.token.length === 64, 'API key must be 32 bytes.');
|
||||
assert(utils.isHex(params.token), 'Wallet token must be a hex string.');
|
||||
assert(params.token.length === 64, 'Wallet token must be 32 bytes.');
|
||||
options.token = new Buffer(params.token, 'hex');
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user