From a32f5fd3721e77722a4e7376b80627942a1176c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Mart=C3=ADn=20Garc=C3=ADa=20Del=20Angel?= Date: Tue, 31 Oct 2017 12:36:31 -0600 Subject: [PATCH] Changed the schedule algorithm to prevent issues --- blockchainManager.js | 6 +++--- composer-logs/trace_20171032-122241-825.log | 4 ++++ composer-logs/trace_20171032-123046-015.log | 4 ++++ dist/lyra-cli.bna | Bin 6163 -> 6163 bytes 4 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 composer-logs/trace_20171032-122241-825.log create mode 100644 composer-logs/trace_20171032-123046-015.log diff --git a/blockchainManager.js b/blockchainManager.js index 2fc13f3..f095524 100644 --- a/blockchainManager.js +++ b/blockchainManager.js @@ -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, diff --git a/composer-logs/trace_20171032-122241-825.log b/composer-logs/trace_20171032-122241-825.log new file mode 100644 index 0000000..b6f6cf3 --- /dev/null +++ b/composer-logs/trace_20171032-122241-825.log @@ -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 "}$ +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 "}$ diff --git a/composer-logs/trace_20171032-123046-015.log b/composer-logs/trace_20171032-123046-015.log new file mode 100644 index 0000000..de7d548 --- /dev/null +++ b/composer-logs/trace_20171032-123046-015.log @@ -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 "}$ +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 "}$ diff --git a/dist/lyra-cli.bna b/dist/lyra-cli.bna index dcbe512e5d872d9cf2a84fcd9e4636ebd94e2ea5..312469a9ca1b62ac3c41dd313e77276316e98af1 100644 GIT binary patch delta 116 zcmbPiFxh}7z?+$civa|VPTt7l!OC=W^5!tsW_A#Lo2Q!@NKeiXPzG^(1=N^8+^s?i qAntXcMPS)#F$=J$m??;QBW4YvG{ucURGhdyh?*~M0HQ96I{^R%V=9&a delta 116 zcmbPiFxh}7z?+$civa|F^=;(wU}gH%w>gZpnH@ym=ILez(vvd;ltJ8H0W~HNcdL*B phfb%mOSbW(uO-h*^UuO>tuo6(?>FqUMVmfT)Y&P5_VzEj9oE