Skip to content

Commit

Permalink
Changed the schedule algorithm to prevent issues
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-headspace committed Oct 31, 2017
1 parent 953c612 commit a32f5fd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blockchainManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,9 @@ class BlockchainManager {
})
.then((aResources) => {
let schedule = [];
for (let i = 0; i < simTrax; i++) {
var fromRandomUser = (Math.floor(Math.random() * (aResources.length - 1)));
var toRandomUser = (Math.floor(Math.random() * (aResources.length - 1)));
for (let i = 1; i <= simTrax; i++) {
var fromRandomUser = (2*i)-1;
var toRandomUser = (2*i);
var fundsRandom = (Math.random() * 1000) + 100;
schedule.push({
from: aResources[fromRandomUser].id,
Expand Down
4 changes: 4 additions & 0 deletions composer-logs/trace_20171032-122241-825.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
2017-10-31T18:22:43.227Z 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-31T18:22:43.228Z 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-31T18:22:43.228Z 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>"}$
4 changes: 4 additions & 0 deletions composer-logs/trace_20171032-123046-015.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
2017-10-31T18:30:47.648Z 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-31T18:30:47.650Z 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-31T18:30:47.650Z 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>"}$
Binary file modified dist/lyra-cli.bna
Binary file not shown.

0 comments on commit a32f5fd

Please sign in to comment.