Skip to content

Commit

Permalink
Small Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-headspace committed Oct 31, 2017
1 parent 44b7851 commit 953c612
Show file tree
Hide file tree
Showing 12 changed files with 155 additions and 14 deletions.
Binary file modified .DS_Store
Binary file not shown.
22 changes: 11 additions & 11 deletions blockchainManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,13 @@ class BlockchainManager {
profilingTime(timeStart,timeEnd,simTrax,whereFrom){
const METHOD = 'profilingTime';

let executedTime = (timeEnd-timeStart);
let opTime = executedTime / simTrax;
let opsPerDay = 86400000 / opTime;
let exp = (opsPerDay.toString().length)-13;
console.log(chalk.bold.blue('EXECUTION TIME:'),chalk.cyan(executedTime));
console.log(chalk.bold.blue('OPERATION TIME:'),chalk.cyan(opTime));
console.log(chalk.bold.blue('OPS PER DAY:'),chalk.cyan(opsPerDay),'or:',chalk.bold.blue('1E'+exp));
let executedTime = (timeEnd-timeStart).toFixed(0);
let opTime = (executedTime / simTrax).toFixed(0);
let opsPerDay = (86400000 / opTime).toFixed(0);
let exp = (opsPerDay.toString().length)-1;
console.log(chalk.bold.yellow('EXECUTION TIME:'),chalk.white(executedTime),'ms');
console.log(chalk.bold.yellow('OPERATION TIME:'),chalk.white(opTime),'ms');
console.log(chalk.bold.yellow('OPS PER DAY:'),chalk.white(opsPerDay),'or:',chalk.bold.yellow('1E'+exp));
if(whereFrom === 'tx'){
if(exp < 9 ){
console.log(
Expand Down Expand Up @@ -511,11 +511,11 @@ class BlockchainManager {
for (let i = 0; i < amount; i++) {
all_promise.push(bm.initializatorDaemon(i, (i + amount), bottom, top));
}
timeStart = now();
timeStart = now().toFixed(0);
return Promise.all(all_promise);
})
.then((arr) => {
timeEnd = now();
timeEnd = now().toFixed(0);
bm.profilingTime(timeStart,timeEnd,amount,'acc');
console.log('Accounts created successfully!');
})
Expand Down Expand Up @@ -566,11 +566,11 @@ class BlockchainManager {
for (let i = 0; i < result.length ; i++){
cannonBalls.push(bm.makeTransaction(result[i].from,result[i].to,result[i].funds));
}
timeStart = now();
timeStart = now().toFixed(0);
return Promise.all(cannonBalls);
})
.then(()=>{
timeEnd = now();
timeEnd = now().toFixed(0);
bm.profilingTime(timeStart,timeEnd,simTrax,'tx');
console.log('Transaction Cannon Finished');
})
Expand Down
4 changes: 4 additions & 0 deletions composer-logs/trace_20171032-112747-415.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
2017-10-31T17:27:48.971Z ERROR HLFConnectionManager :fabric-client() [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))
at /usr/local/lib/node_modules/composer-cli/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:434:17 {}$
2017-10-31T17:27:48.973Z ERROR HLFConnection :queryChainCode() {"message":"Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))","stack":"Error: Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))\n at channel.queryByChaincode.then.catch (/usr/local/lib/node_modules/composer-cli/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:749:34)\n at <anonymous>"}$
2017-10-31T17:27:48.973Z ERROR HLFConnection :ping() {"message":"Error trying to ping. Error: Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))","stack":"Error: Error trying to ping. Error: Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))\n at _checkRuntimeVersions.then.catch (/usr/local/lib/node_modules/composer-cli/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:663:34)\n at <anonymous>"}$
33 changes: 33 additions & 0 deletions composer-logs/trace_20171032-113313-706.log

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions composer-logs/trace_20171032-114450-287.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
2017-10-31T17:44:51.817Z ERROR HLFConnectionManager :fabric-client() [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))
at /usr/local/lib/node_modules/composer-cli/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:434:17 {}$
2017-10-31T17:44:51.818Z ERROR HLFConnection :queryChainCode() {"message":"Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))","stack":"Error: Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))\n at channel.queryByChaincode.then.catch (/usr/local/lib/node_modules/composer-cli/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:749:34)\n at <anonymous>"}$
2017-10-31T17:44:51.819Z ERROR HLFConnection :ping() {"message":"Error trying to ping. Error: Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))","stack":"Error: Error trying to ping. Error: Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))\n at _checkRuntimeVersions.then.catch (/usr/local/lib/node_modules/composer-cli/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:663:34)\n at <anonymous>"}$
Loading

0 comments on commit 953c612

Please sign in to comment.