diff --git a/package.json b/package.json index 22ca8c5fb19c2b2b9e85c0b134c8d24f0c22ffdb..913d205f787926f93bb3e58eb08d8efb5a1933f8 100755 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "rimraf": "^2.6.1", "tmp": "^0.0.31", "underscore": "1.8.3", - "wotb": "^0.6.2", "ws": "1.1.1" }, "devDependencies": { diff --git a/routes/members.js b/routes/members.js index de44f4fbb9376ec0c309339714045150b3e059ad..0e566fffd265e0854ef8790213bfe947b1529ecd 100755 --- a/routes/members.js +++ b/routes/members.js @@ -1,7 +1,7 @@ "use strict"; const co = require('co') -const wotb = require('wotb') +//const wotb = require('wotb') const timestampToDatetime = require(__dirname + '/../lib/timestampToDatetime') @@ -36,7 +36,7 @@ module.exports = (req, res, next) => co(function *() { var format = req.query.format || 'HTML'; // Alimenter wotb avec la toile actuelle - const wotbInstance = wotb.newFileInstance(duniterServer.home + '/wotb.bin'); + //const wotbInstance = wotb.newFileInstance(duniterServer.home + '/wotb.bin'); // Récupérer la liste des identités ayant actuellement le statut de membre const membersList = yield duniterServer.dal.peerDAL.query('SELECT `uid`,`pub`,`member`,`written_on`,`wotb_id` FROM i_index WHERE `member`=1'); @@ -63,8 +63,8 @@ module.exports = (req, res, next) => co(function *() { 'SELECT `medianTime` FROM block WHERE `number`=\''+blockstampIdtyWritten[0]+'\' LIMIT 1') // Tester la distance - let tmpWot = wotbInstance.memCopy(); - //let tmpWot = duniterServer.dal.wotb.memCopy(); + //let tmpWot = wotbInstance.memCopy(); + let tmpWot = duniterServer.dal.wotb.memCopy(); //let detailedDistance = tmpWot.detailedDistance(pendingIdtyWID, dSen, conf.stepMax, conf.xpercent); //let isOutdistanced = detailedDistance.isOutdistanced; diff --git a/routes/willMembers.js b/routes/willMembers.js index ea865b81d50346050735159f95d2e98107d66f81..be963cdcfa1ca4d5cab6163fa44437512e13e1fc 100755 --- a/routes/willMembers.js +++ b/routes/willMembers.js @@ -2,7 +2,7 @@ const co = require('co') const crypto = require('crypto') -const wotb = require('wotb') +//const wotb = require('wotb') const timestampToDatetime = require(__dirname + '/../lib/timestampToDatetime') @@ -57,7 +57,7 @@ module.exports = (req, res, next) => co(function *() { lastUpgradeTime = Math.floor(Date.now() / 1000); // Alimenter wotb avec la toile actuelle - const wotbInstance = wotb.newFileInstance(duniterServer.home + '/wotb.bin'); + //const wotbInstance = wotb.newFileInstance(duniterServer.home + '/wotb.bin'); // Récupérer la liste des identités en piscine const resultQueryIdtys = yield duniterServer.dal.peerDAL.query('SELECT `buid`,`pubkey`,`uid`,`hash`,`expires_on` FROM identities_pending WHERE `member`=0'); @@ -282,17 +282,17 @@ module.exports = (req, res, next) => co(function *() { if (!doubloon) { // Tester la distance à l'aide des certifications disponibles - let tmpWot = wotbInstance.memCopy(); - //let tmpWot = duniterServer.dal.wotb.memCopy(); + //let tmpWot = wotbInstance.memCopy(); + let tmpWot = duniterServer.dal.wotb.memCopy(); let pendingIdtyWID = tmpWot.addNode(); for (const cert of idtysPendingCertifsList[idMax]) { tmpWot.addLink(cert.wid, pendingIdtyWID); } - let detailedDistance = tmpWot.detailedDistance(pendingIdtyWID, dSen, conf.stepMax, conf.xpercent); - let isOutdistanced = detailedDistance.isOutdistanced; - //let isOutdistanced = tmpWot.isOutdistanced(pendingIdtyWID, dSen, conf.stepMax, conf.xpercent); + //let detailedDistance = tmpWot.detailedDistance(pendingIdtyWID, dSen, conf.stepMax, conf.xpercent); + //let isOutdistanced = detailedDistance.isOutdistanced; + let isOutdistanced = tmpWot.isOutdistanced(pendingIdtyWID, dSen, conf.stepMax, conf.xpercent); // Tester la présence de l'adhésion let membership = null diff --git a/views/about.html b/views/about.html index d69d04db8f637ffc80c24d6a17ef0f96c4d19b8e..0b8d955630c60b47bdb900f83c791606a6c0d655 100755 --- a/views/about.html +++ b/views/about.html @@ -31,7 +31,7 @@ ${(host.substr(host.length-6,6) == '.onion') ? HTML_TOR_HEAD:HTML_HEAD} <a href="https://github.com/duniter/duniter-currency-monit/blob/master/LICENSE">License AGPL V 3.0</a><br> <a href="https://github.com/duniter/duniter-currency-monit/">github repository</a> </div><br> -<div align="left">Version : <a href="https://github.com/duniter/duniter-currency-monit/releases/tag/module-0.2.12">module-0.2.12</a></div><br> +<div align="left">Version : <a href="https://github.com/duniter/duniter-currency-monit/releases/tag/module-0.2.13">module-0.2.13</a></div><br> <div align="left">Author : <a href="https://github.com/librelois">Éloïs Librelois</a></div><br> <div align="left">Contributors : <a href="https://github.com/jytou">jytou</a> (translator), <a href="https://github.com/devingfx">devingfx</a> (frontend), <a href="https://github.com/c-geek">cgeek</a> (willMembers and wotex),<a href="https://github.com/M5oul">M5oul</a> (adjustments)</div><br> <br>