From 5c05b7f8d9600a46bbebbebe8aea0d59465f61bc Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sun, 30 Oct 2016 19:53:23 -0400 Subject: [PATCH] simplify whisper config condition --- lib/blockchain.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/blockchain.js b/lib/blockchain.js index 7e060ce53..c8e60f58a 100644 --- a/lib/blockchain.js +++ b/lib/blockchain.js @@ -19,15 +19,10 @@ var Blockchain = function(blockchainConfig, Client) { port: this.blockchainConfig.port || 30303, nodiscover: this.blockchainConfig.nodiscover || false, mine: this.blockchainConfig.mine || false, - account: this.blockchainConfig.account || {} + account: this.blockchainConfig.account || {}, + whisper: (this.blockchainConfig.whisper === undefined) || this.blockchainConfig.whisper }; - if (this.blockchainConfig.whisper === false) { - this.config.whisper = false; - } else { - this.config.whisper = (this.blockchainConfig.whisper || true); - } - this.client = new Client({config: this.config}); };