diff --git a/modules/node.js b/modules/node.js index b7f8724f..a84dacad 100644 --- a/modules/node.js +++ b/modules/node.js @@ -100,13 +100,16 @@ Node.prototype.shared = { * @return {Function} cb Callback function from params (through setImmediate) * @return {Object} cb.err Always return `null` here * @return {Object} cb.obj Anonymous object with version info - * @return {String} cb.obj.build Build information (if available, otherwise '') - * @return {String} cb.obj.commit Hash of last git commit (if available, otherwise '') - * @return {String} cb.obj.version Lisk version from config file + * @return {Object} cb.obj.network Anonymous object with network info + * @return {Object} cb.obj.wsClient Anonymous object with WebSocket Client info + * @return {Boolean} cb.obj.wsClient.enabled are webSockets available. + * @return {Object} cb.obj.version Anonymous object with version info + * @return {String} cb.obj.version.build Build information (if available, otherwise '') + * @return {String} cb.obj.version.commit Hash of last git commit (if available, otherwise '') + * @return {String} cb.obj.version.version ADAMANT version from package.json */ getStatus: function (req, cb) { var lastBlock = modules.blocks.lastBlock.get(); - var wsClientEnabled = false; var wsClientOptions = { enabled: false }; @@ -116,11 +119,8 @@ Node.prototype.shared = { wsClientOptions.port = library.config.wsClient.portWS; } } - - return setImmediate(cb, null, { - wsClient: wsClientOptions, network: { broadhash: modules.system.getBroadhash(), epoch: constants.epochTime, @@ -135,7 +135,8 @@ Node.prototype.shared = { build: library.build, commit: library.lastCommit, version: library.config.version - } + }, + wsClient: wsClientOptions }); } };