fixed problem with double this.client in blockchain.js
This commit is contained in:
parent
fbe3f302b2
commit
7599f43a3b
|
@ -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',
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue