Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug that fisco-bcos adapter can't open network certificate file #677

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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