http: minor.

This commit is contained in:
Christopher Jeffrey 2016-09-30 12:48:19 -07:00
parent 60eec9e0a0
commit f297591193
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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');
}