fixed problem with double this.client in blockchain.js

This commit is contained in:
Todd Baur 2017-03-30 20:48:22 +09:00
parent fbe3f302b2
commit 7599f43a3b
2 changed files with 39 additions and 41 deletions

View File

@ -18,7 +18,7 @@ class Blockchain {
constructor(options) {
this.blockchainConfig = options.blockchainConfig;
this.env = options.env || 'development';
this.client = BlockchainClient(this.blockchainConfig, 'geth', this.env);
this.client = options.client;
this.config = {
geth_bin: this.blockchainConfig.geth_bin || 'geth',

View File

@ -1,6 +1,6 @@
/*globals describe, it*/
const Blockchain = require('../lib/cmds/blockchain/blockchain');
// let BlockchainClient = require('../lib/cmds/blockchain/blockchain_client');
const assert = require('assert');
describe('embark.Blockchain', function () {
@ -13,7 +13,6 @@ describe('embark.Blockchain', function() {
describe('with empty config', function () {
it('should have a default config', function () {
let config = {
blockchainConfig: {
networkType: 'custom',
genesisBlock: false,
geth_bin: 'geth',
@ -31,9 +30,8 @@ describe('embark.Blockchain', function() {
vmdebug: false,
whisper: true,
account: {},
bootnodes: "",
}
}
bootnodes: ""
};
let blockchain = new Blockchain(config, 'geth');
assert.deepEqual(blockchain.config, config);