From a4a812e7b1aa147c716d477ca74a004774e27ab6 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Mon, 11 Jun 2018 12:02:00 -0400 Subject: [PATCH 1/2] make proxy mode the default --- lib/cmds/blockchain/blockchain.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/cmds/blockchain/blockchain.js b/lib/cmds/blockchain/blockchain.js index 4841e4bf..67a7b05b 100644 --- a/lib/cmds/blockchain/blockchain.js +++ b/lib/cmds/blockchain/blockchain.js @@ -74,18 +74,19 @@ var Blockchain = function(options) { this.client = new options.client({config: this.config, env: this.env, isDev: this.isDev}); }; -Blockchain.prototype.setupProxy = function(){ - if(this.blockchainConfig.proxy){ - 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 += 10; - this.config.wsPort += 10; +Blockchain.prototype.setupProxy = function() { + if (this.blockchainConfig.proxy === false) { + return; } + 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 += 10; + this.config.wsPort += 10; }; Blockchain.prototype.runCommand = function(cmd, options, callback) { From c4eb042efff43666d455a17db1827a758d0ae7a3 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Mon, 11 Jun 2018 12:13:30 -0400 Subject: [PATCH 2/2] color output --- lib/modules/console_listener/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/modules/console_listener/index.js b/lib/modules/console_listener/index.js index 6d022fdf..ca058035 100644 --- a/lib/modules/console_listener/index.js +++ b/lib/modules/console_listener/index.js @@ -67,9 +67,9 @@ class ConsoleListener { gasUsed = utils.hexToNumber(gasUsed); 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 { - this.logger.debug(JSON.stringify(request)); + this.logger.info(JSON.stringify(request)); } }); }