Skip to content

Commit

Permalink
light refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
zyuhel committed Jan 30, 2019
1 parent 923bb46 commit 935a7dc
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions modules/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand All @@ -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,
Expand All @@ -135,7 +135,8 @@ Node.prototype.shared = {
build: library.build,
commit: library.lastCommit,
version: library.config.version
}
},
wsClient: wsClientOptions
});
}
};
Expand Down

0 comments on commit 935a7dc

Please sign in to comment.