diff --git a/app/lib/dal/fileDAL.js b/app/lib/dal/fileDAL.js index 1da9a15636f65428cc7e57dc6695125683f5861a..d0993aae0a6cdbf280cdfa3a168ce0e7b2feee1a 100644 --- a/app/lib/dal/fileDAL.js +++ b/app/lib/dal/fileDAL.js @@ -103,11 +103,6 @@ function FileDAL(params) { return block || null; }); - this.getBlockBuggy = (number) => co(function*() { - const block = yield that.blockDAL.getBlock(Math.max(0, number - 1)); // This is the bug: we look at previous block - return block || null; - }); - this.getAbsoluteBlockByNumberAndHash = (number, hash) => that.blockDAL.getAbsoluteBlock(number, hash); @@ -127,10 +122,6 @@ function FileDAL(params) { return that.getBlockByNumberAndHash(number, hash); }; - this.getBlockByBlockstampBuggy = (blockstamp) => { - return that.getBlockBuggy(parseInt(blockstamp)); - }; - this.getBlockByNumberAndHash = (number, hash) => co(function*() { try { const block = yield that.getBlock(number); diff --git a/app/lib/dup/indexer.js b/app/lib/dup/indexer.js index 3938a82fe37433e7691e65eaa030eee3c3f0cd3b..f9a71abd7630fee7c8a9573453ad22368740bee9 100644 --- a/app/lib/dup/indexer.js +++ b/app/lib/dup/indexer.js @@ -1474,7 +1474,7 @@ const indexer = module.exports = { basedBlock = HEAD; } else { if (HEAD.currency === 'gtest') { - basedBlock = yield dal.getBlockByBlockstampBuggy(MS.created_on); // TODO: fix for v1.0.0 + basedBlock = yield dal.getBlockByBlockstamp(MS.created_on); } else { basedBlock = yield dal.getBlockByBlockstamp(MS.created_on); } @@ -1493,7 +1493,7 @@ const indexer = module.exports = { basedBlock = HEAD; } else { if (HEAD.currency === 'gtest') { - basedBlock = yield dal.getBlockBuggy(CERT.created_on); // TODO: fix for v1.0.0 + basedBlock = yield dal.getBlock(CERT.created_on); } else { basedBlock = yield dal.getBlock(CERT.created_on); } diff --git a/package.json b/package.json index 676398dae9aa4522207990082e291b9d82767433..a810dea17139347e534e1774f9965b71c520ee25 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "daemonize2": "0.4.2", "duniter-bma": "^0.2.11", "duniter-common": "0.1.0", - "duniter-crawler": "^0.2.16", + "duniter-crawler": "^1.0.0", "duniter-keypair": "^0.3.0", "duniter-prover": "^1.0.0", "event-stream": "3.3.4",