From cb0f8b011e133af5b1b8702727eb46d35a5b4437 Mon Sep 17 00:00:00 2001 From: emizzle Date: Wed, 20 Nov 2019 15:04:31 +1100 Subject: [PATCH] chore(@embark/whisper): improve whisper startup logging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When whisper was being started in a new process, the message displayed in the console was “Starting Blockchain node in another process”. This is misleading as it is the same message that geth/parity use to start up their processes. Update whisper initialisation process messaging so it states “Starting Whisper node in another process”. --- packages/plugins/geth/src/blockchain.js | 3 ++- packages/plugins/geth/src/blockchainProcessLauncher.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/plugins/geth/src/blockchain.js b/packages/plugins/geth/src/blockchain.js index fd57d5a51..416786e10 100644 --- a/packages/plugins/geth/src/blockchain.js +++ b/packages/plugins/geth/src/blockchain.js @@ -26,6 +26,7 @@ var Blockchain = function(userConfig, clientClass, communicationConfig) { this.events = userConfig.events; this.isStandalone = userConfig.isStandalone; this.certOptions = userConfig.certOptions; + this.isWhisper = !!communicationConfig; let defaultWsApi = clientClass.DEFAULTS.WS_API; @@ -165,7 +166,7 @@ Blockchain.prototype.run = function () { var self = this; this.logger.info("===============================================================================".magenta); this.logger.info("===============================================================================".magenta); - this.logger.info(__("Embark Blockchain using %s", self.client.prettyName.underline).magenta); + this.logger.info(__(`Embark ${this.isWhisper ? "Whisper" : "Blockchain"} using %s`, self.client.prettyName.underline).magenta); this.logger.info("===============================================================================".magenta); this.logger.info("===============================================================================".magenta); diff --git a/packages/plugins/geth/src/blockchainProcessLauncher.js b/packages/plugins/geth/src/blockchainProcessLauncher.js index 99cfd3925..2c18d9412 100644 --- a/packages/plugins/geth/src/blockchainProcessLauncher.js +++ b/packages/plugins/geth/src/blockchainProcessLauncher.js @@ -15,6 +15,7 @@ export class BlockchainProcessLauncher { this.isDev = options.isDev; this.client = options.client; this.embark = options.embark; + this.isWhisper = !!this.communicationConfig; } processEnded(code) { @@ -22,7 +23,7 @@ export class BlockchainProcessLauncher { } startBlockchainNode(readyCb) { - this.logger.info(__('Starting Blockchain node in another process').cyan); + this.logger.info(__(`Starting ${this.isWhisper ? "Whisper" : "Blockchain"} node in another process`).cyan); this.blockchainProcess = new ProcessLauncher({ name: 'blockchain', @@ -47,7 +48,7 @@ export class BlockchainProcessLauncher { }); this.blockchainProcess.once('result', constants.blockchain.blockchainReady, () => { - this.logger.info(__('Blockchain node is ready').cyan); + this.logger.info(__(`${this.isWhisper ? "Whisper" : "Blockchain"} node is ready`).cyan); readyCb(); // this.events.emit(constants.blockchain.blockchainReady); });