Skip to content

Commit 5c05b7f

Browse files
committed
simplify whisper config condition
1 parent 88bdd66 commit 5c05b7f

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/blockchain.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,10 @@ var Blockchain = function(blockchainConfig, Client) {
1919
port: this.blockchainConfig.port || 30303,
2020
nodiscover: this.blockchainConfig.nodiscover || false,
2121
mine: this.blockchainConfig.mine || false,
22-
account: this.blockchainConfig.account || {}
22+
account: this.blockchainConfig.account || {},
23+
whisper: (this.blockchainConfig.whisper === undefined) || this.blockchainConfig.whisper
2324
};
2425

25-
if (this.blockchainConfig.whisper === false) {
26-
this.config.whisper = false;
27-
} else {
28-
this.config.whisper = (this.blockchainConfig.whisper || true);
29-
}
30-
3126
this.client = new Client({config: this.config});
3227
};
3328

0 commit comments

Comments
 (0)