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
fix bug that fisco-bcos adapter can't open network certificate file
Signed-off-by: Chenxi Li <[email protected]>
vita-dounai committed Dec 9, 2019
commit c1488584a94e9b30f45c62181717c825a2c5b1ca
8 changes: 7 additions & 1 deletion packages/caliper-fisco-bcos/lib/fiscoBcos.js
Original file line number Diff line number Diff line change
@@ -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);
}
}
}

/**
@@ -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) {