Skip to content

Commit

Permalink
Merge pull request #677 from vita-dounai/fix-fisco-bcos-cert-path
Browse files Browse the repository at this point in the history
fix bug that fisco-bcos adapter can't open network certificate file
  • Loading branch information
aklenik authored Jan 8, 2020
2 parents f4b43e4 + c148858 commit 06641ab
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/caliper-fisco-bcos/lib/fiscoBcos.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,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] = CaliperUtils.resolvePath(this.fiscoBcosSettings.network.authentication[k], workspace_root);
}
}
}

/**
Expand All @@ -54,7 +60,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 06641ab

Please sign in to comment.