From a7c716e792c0edf6032f310eebb7e639c27fd97f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Mart=C3=ADn=20Garc=C3=ADa=20Del=20Angel?= Date: Wed, 1 Nov 2017 12:47:38 -0600 Subject: [PATCH] RC 1 --- blockchainManager.js | 22 +++++++++++++------- composer-logs/trace_20171102-124015-064.log | 4 ++++ dist/lyra-cli.bna | Bin 6163 -> 9752 bytes index.js | 2 +- 4 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 composer-logs/trace_20171102-124015-064.log diff --git a/blockchainManager.js b/blockchainManager.js index 450ae7d..7a47234 100644 --- a/blockchainManager.js +++ b/blockchainManager.js @@ -641,18 +641,17 @@ class BlockchainManager { /** Get the state of the database */ return mongo.getAllAst() .then((result) => { - let arr = result; + modState = result; for (let i = 0; i < schedule.length; i++) { - for (let x = 0; x < arr.length; x++) { - if (arr[x].id == schedule[i].from) { - arr[x].balance = arr[x].balance - schedule[i].funds; + for (let x = 0; x < modState.length; x++) { + if (modState[x].id == schedule[i].from) { + modState[x].balance = modState[x].balance - schedule[i].funds; } - if (arr[x].id == schedule[i].to) { - arr[x].balance = arr[x].balance + schedule[i].funds; + if (modState[x].id == schedule[i].to) { + modState[x].balance = modState[x].balance + schedule[i].funds; } } } - modState = arr; return bm.init(); }) .then(() => { @@ -660,13 +659,22 @@ class BlockchainManager { }) .then((rawLedger) => { let state = true; + let unsynced = []; for (let i = 0; i < rawLedger.length; i++) { for (let x = 0; x < modState.length; x++) { if (rawLedger[i].id == modState[x].id && rawLedger[i].balance != modState[x].balance) { + unsynced.push(rawLedger[i].id); state = false; } } } + if(!state){ + console.log('=============== UNSYNCED ==============='); + for(let i=0;i"}$ +2017-11-01T18:40:17.021Z 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 (/Users/a01334390/Documents/Git Projects/Lyra/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 312469a9ca1b62ac3c41dd313e77276316e98af1..9d14c9051b1ef813e80dc784e0fd42f744bd7439 100644 GIT binary patch literal 9752 zcmd5?OK&7uR`xIhBT^#)0wICW=*ZQQAMK3vqpGXNtwChD9$hMTwQ0MlMbV><%($5u zQ{rBI;FaG1=2mfTgx3R(RA7HJB$CvTcL_hU5|7J6f=VtSGGh4X0 zKhDz4z0E7*d}?zn?nfU-A7dpke(chs46C0m3ga@9OpTKhJ1?xqFXt5&n^b`uF9EpIA|D;tX!D!EVr4RrpEu`Uw`qBhx-Q)r7!2k;l?eG=kXky=5flq(>yUZ z;1Mg~a=&@}&E_O^zU=$b6d{;15 ztra2TIG2%;=HNtfd%eYj%h;8lo<8j`piBMPQZF?Nr7hM8ZE>5fG_gzUb-qg5tcJ4^ zQ)G70sCFrPnx~~2B#=3X0`@w*)hoj+3lv3~PnXAx8~f$KXu`+R&!zDP=@&A~CRYd2 zPbE&~X)b*qekraSZQ#1xCe&4Jvp0L2mu3MkNMN>=Hyj zIgA3qID?|GupjM52iO32?|TTG!{JGH5FO}2TrcBMrg0IgcaXS(+j09(_M?ZcX{0(UGz@ zPacqjQc;Sz&8IdQHA_cF%^Kp8i}$00!{|O1t&79a;TUi+v2GscW7CIghy8)o!od~` zTa`ssa|6}j1V1xbhLEgv@BmBKj1L8iR?UmpO_k=O=m8jh^X6;?j{f-{kSDM0Vl>*;8ma59Ex{l0gO2N{6v=CBxlb4)Qn3RRcTfV z#F36vy?giMS#T;j4^Gv)m>C~p+EruqLb*<}OdwbxkXYb_QqGLPOnP!vNSr6)syt_8 z*ql^O;Lvdfsgi3uiQc1xA1$R{jwp8YHIx9UF7vM2V$ZJP6kzCB2t)@JB$;Y0O(2(+|@=%WV zO+p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b/index.js @@ -7,7 +7,7 @@ var figlet = require('figlet'); var inquirer = require('inquirer'); //Hyperledger Fabric Code And Connectors -var hyper = require('./lib/blockchainManager'); +var hyper = require('./blockchainManager'); var jsond = require('./package'); var index = require('.');