mirror of https://github.com/embarklabs/embark.git
get node name and version
This commit is contained in:
parent
5a91b2d44a
commit
044759ef52
|
@ -210,11 +210,13 @@ class Engine {
|
||||||
if (err) {
|
if (err) {
|
||||||
return cb({name: "No Blockchain node found", status: 'off'});
|
return cb({name: "No Blockchain node found", status: 'off'});
|
||||||
}
|
}
|
||||||
return cb({
|
|
||||||
//name: (self.web3.version.node.split("/")[0] + " " + self.web3.version.node.split("/")[1].split("-")[0] + " (Ethereum)"),
|
// TODO: web3_clientVersion method is currently not implemented in web3.js 1.0
|
||||||
// TODO: get nodename
|
self.web3._requestManager.send({method: 'web3_clientVersion', params: []}, (err, version) => {
|
||||||
name: "Ethereum node",
|
if (err) {
|
||||||
status: 'on'
|
return cb({name: "Ethereum node (version unknown)", status: 'on'});
|
||||||
|
}
|
||||||
|
return cb({name: version, status: 'on'});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue