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]>
  • Loading branch information
vita-dounai committed Dec 9, 2019
1 parent 4f429b6 commit c148858
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 c148858

Please sign in to comment.