Format changes

This commit is contained in:
Richard Ramos 2018-06-11 15:47:21 -04:00
commit 16ab8136a2
2 changed files with 14 additions and 13 deletions

View File

@ -75,18 +75,19 @@ var Blockchain = function(options) {
this.client = new options.client({config: this.config, env: this.env, isDev: this.isDev}); this.client = new options.client({config: this.config, env: this.env, isDev: this.isDev});
}; };
Blockchain.prototype.setupProxy = function(){ Blockchain.prototype.setupProxy = function() {
if(this.blockchainConfig.proxy){ if (this.blockchainConfig.proxy === false) {
const proxy = require('../../core/proxy'); return;
const Ipc = require('../../core/ipc');
let ipcObject = new Ipc({ipcRole: 'client'});
proxy.serve(ipcObject, this.config.rpcHost, this.config.rpcPort, false);
proxy.serve(ipcObject, this.config.wsHost, this.config.wsPort, true);
this.config.rpcPort += constants.blockchain.servicePortOnProxy;
this.config.wsPort += constants.blockchain.servicePortOnProxy;
} }
const proxy = require('../../core/proxy');
const Ipc = require('../../core/ipc');
let ipcObject = new Ipc({ipcRole: 'client'});
proxy.serve(ipcObject, this.config.rpcHost, this.config.rpcPort, false);
proxy.serve(ipcObject, this.config.wsHost, this.config.wsPort, true);
this.config.rpcPort += constants.blockchain.servicePortOnProxy;
this.config.wsPort += constants.blockchain.servicePortOnProxy;
}; };
Blockchain.prototype.runCommand = function(cmd, options, callback) { Blockchain.prototype.runCommand = function(cmd, options, callback) {

View File

@ -76,9 +76,9 @@ class ConsoleListener {
gasUsed = utils.hexToNumber(gasUsed); gasUsed = utils.hexToNumber(gasUsed);
blockNumber = utils.hexToNumber(blockNumber); blockNumber = utils.hexToNumber(blockNumber);
this.logger.debug(`${name}.${functionName}(${paramString}) : ${transactionHash} | gas:${gasUsed} | blk:${blockNumber} | status:${status}`); this.logger.info(`Blockchain>`.underline + ` ${name}.${functionName}(${paramString})`.bold + ` | ${transactionHash} | gas:${gasUsed} | blk:${blockNumber} | status:${status}`);
} else { } else {
this.logger.debug(JSON.stringify(request)); this.logger.info(JSON.stringify(request));
} }
}); });
} }