Skip to content

Commit

Permalink
Merge pull request #30 from Adamant-im/dev
Browse files Browse the repository at this point in the history
Fixes for release 0.5.0
  • Loading branch information
zyuhel authored Jan 30, 2019
2 parents a552315 + 316b826 commit ad4cccb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@
},
"dapp": {
"masterrequired": true,
"masterpassword": "rJ1T2sZH3cLU",
"masterpassword": "",
"autoexec": []
},
"wsClient": {
"portWS": 36668,
"enabled": true
},
"nethash": "bd330166898377fb28743ceef5e43a5d9d0a3efd9b3451fb7bc53530bb0a6d64"
}
}
23 changes: 14 additions & 9 deletions modules/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,27 @@ 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
};
if (library.config.wsClient) {
if (library.config.wsClient.enabled) {
wsClientEnabled = true;
wsClientOptions.enabled = true;
wsClientOptions.port = library.config.wsClient.portWS;
}
}
return setImmediate(cb, null,
{
wsClient: {
enabled: wsClientEnabled
},
network: {
broadhash: modules.system.getBroadhash(),
epoch: constants.epochTime,
Expand All @@ -131,7 +135,8 @@ Node.prototype.shared = {
build: library.build,
commit: library.lastCommit,
version: library.config.version
}
},
wsClient: wsClientOptions
});
}
};
Expand Down

0 comments on commit ad4cccb

Please sign in to comment.