Skip to content

Commit

Permalink
Fix #536: Minor changes in the error messages of 'caliper-fisco-bcos'…
Browse files Browse the repository at this point in the history
… package (#1383)

* Update error messages for 'ethereum-connector'

Signed-off-by: Tezas-6174 <jamdade.2@iitj.ac.in>

* Fix and organize a few error messages

Signed-off-by: Tezas-6174 <jamdade.2@iitj.ac.in>

* minor changes in caliper-fisco-bcos

Signed-off-by: Tezas-6174 <jamdade.2@iitj.ac.in>

* resolve conflicts with caliper-ethereum package

Signed-off-by: Tezas-6174 <jamdade.2@iitj.ac.in>
  • Loading branch information
0xt3j4s committed Jun 27, 2022
1 parent 158a367 commit f1634b5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/caliper-fisco-bcos/lib/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports.findContractAddress = function(workspaceRoot, smartContracts, con
});

if (smartContract === undefined) {
commLogger.error(`Smart contract ${contractID} undefined`);
commLogger.error(`Smart contract ${contractID} is undefined`);
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/caliper-fisco-bcos/lib/installSmartContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports.run = async function (fiscoBcosSettings, workspaceRoot) {
const smartContracts = fiscoBcosSettings.smartContracts;

if (!isArray(smartContracts)) {
throw new Error('No available configuration for smart contracts');
throw new Error('No configuration available for smart contracts');
}

commLogger.info('Deploying smart contracts ...');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ Transaction.prototype.validate = function (stringError) {
}

if (this.getBaseFee().cmp(new BN(this.gasLimit)) > 0) {
errors.push([`gas limit is to low. Need at least ${this.getBaseFee()}`]);
errors.push([`gas limit is too low. Need at least ${this.getBaseFee()}`]);
}

if (stringError === undefined || stringError === false) {
Expand Down
2 changes: 1 addition & 1 deletion packages/caliper-fisco-bcos/lib/web3lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function toBuffer(data) {
} else if (data.toArray) {
data = Buffer.from(data.toArray());
} else {
throw new Error('invalid type');
throw new Error('invalid data type');
}
}
return data;
Expand Down

0 comments on commit f1634b5

Please sign in to comment.