only use personal in --dev mode
This commit is contained in:
parent
eda616dc73
commit
69f356b3f0
|
@ -20,6 +20,11 @@ var Blockchain = function(options) {
|
|||
console.log("===> " + __("warning: running default config on a non-development environment"));
|
||||
}
|
||||
|
||||
let defaultWsApi = ['eth', 'web3', 'net', 'shh', 'debug'];
|
||||
if (this.isDev) {
|
||||
defaultWsApi.push('personal');
|
||||
}
|
||||
|
||||
this.config = {
|
||||
geth_bin: this.blockchainConfig.geth_bin || 'geth',
|
||||
networkType: this.blockchainConfig.networkType || 'custom',
|
||||
|
@ -42,7 +47,7 @@ var Blockchain = function(options) {
|
|||
wsHost: this.blockchainConfig.wsHost || 'localhost',
|
||||
wsPort: this.blockchainConfig.wsPort || 8546,
|
||||
wsOrigins: this.blockchainConfig.wsOrigins || false,
|
||||
wsApi: (this.blockchainConfig.wsApi || ['eth', 'web3', 'net', 'shh', 'debug', 'personal']),
|
||||
wsApi: (this.blockchainConfig.wsApi || defaultWsApi),
|
||||
vmdebug: this.blockchainConfig.vmdebug || false,
|
||||
targetGasLimit: this.blockchainConfig.targetGasLimit || false,
|
||||
syncMode: this.blockchainConfig.syncMode,
|
||||
|
|
|
@ -123,7 +123,13 @@ class GethCommands {
|
|||
let self = this;
|
||||
let config = this.config;
|
||||
let rpc_api = (this.config.rpcApi || ['eth', 'web3', 'net', 'debug']);
|
||||
let ws_api = (this.config.wsApi || ['eth', 'web3', 'net', 'debug', 'personal']);
|
||||
|
||||
let defaultWsApi = ['eth', 'web3', 'net', 'shh', 'debug'];
|
||||
if (this.isDev) {
|
||||
defaultWsApi.push('personal');
|
||||
}
|
||||
|
||||
let ws_api = (this.config.wsApi || defaultWsApi);
|
||||
|
||||
let args = [];
|
||||
|
||||
|
|
Loading…
Reference in New Issue