Skip to content

Commit

Permalink
fix bug that fisco-bcos adapter can't open network certificate file
Browse files Browse the repository at this point in the history
Signed-off-by: Chenxi Li <[email protected]>

add semicolon
  • Loading branch information
vita-dounai committed Dec 4, 2019
1 parent 4f429b6 commit d4ee565
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/caliper-fisco-bcos/lib/fiscoBcos.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const {
BlockchainInterface,
CaliperUtils
} = require('@hyperledger/caliper-core');
const path = require('path');
const installSmartContractImpl = require('./installSmartContract');
const invokeSmartContractImpl = require('./invokeSmartContract');
const generateRawTransactionImpl = require('./generateRawTransactions');
Expand All @@ -38,6 +39,12 @@ class FiscoBcos extends BlockchainInterface {
this.bcType = 'fisco-bcos';
this.workspaceRoot = workspace_root;
this.fiscoBcosSettings = CaliperUtils.parseYaml(this.configPath)['fisco-bcos'];

if (this.fiscoBcosSettings.network && this.fiscoBcosSettings.network.authentication) {
for (let k in this.fiscoBcosSettings.network.authentication) {
this.fiscoBcosSettings.network.authentication[k] = path.join(this.workspaceRoot, this.fiscoBcosSettings.network.authentication[k]);
}
}
}

/**
Expand All @@ -54,7 +61,7 @@ class FiscoBcos extends BlockchainInterface {
* @async
*/
async installSmartContract() {
const fiscoBcosSettings = CaliperUtils.parseYaml(this.configPath)['fisco-bcos'];
const fiscoBcosSettings = this.fiscoBcosSettings;
try {
await installSmartContractImpl.run(fiscoBcosSettings, this.workspaceRoot);
} catch (error) {
Expand Down

0 comments on commit d4ee565

Please sign in to comment.