diff --git a/app/lib/blockchain/DuniterBlockchain.ts b/app/lib/blockchain/DuniterBlockchain.ts index 6e8955c17438d3f67e698c91b82bd272284b9dff..cb036850ebfe0859f4c86cdf28340b4635d3c33f 100644 --- a/app/lib/blockchain/DuniterBlockchain.ts +++ b/app/lib/blockchain/DuniterBlockchain.ts @@ -38,7 +38,7 @@ import {DBTx} from "../db/DBTx" import {Underscore} from "../common-libs/underscore" import {OtherConstants} from "../other_constants" import {MonitorExecutionTime} from "../debug/MonitorExecutionTime" -import {Wot} from "dubp-wot-rs" +import {Wot} from "duniteroxyde" import { Directory } from "../system/directory" export class DuniterBlockchain { diff --git a/app/lib/dal/fileDAL.ts b/app/lib/dal/fileDAL.ts index ef4a60730f3f39ec84f3120c9623e08aeef39298..8827044ed24718a27fdc94be2d949ee9e7a4a036 100644 --- a/app/lib/dal/fileDAL.ts +++ b/app/lib/dal/fileDAL.ts @@ -43,7 +43,7 @@ import {MetaDAL} from "./sqliteDAL/MetaDAL" import {DataErrors} from "../common-libs/errors" import {BasicRevocableIdentity, IdentityDTO} from "../dto/IdentityDTO" import {FileSystem} from "../system/directory" -import {Wot} from "dubp-wot-rs" +import {Wot} from "duniteroxyde" import {IIndexDAO} from "./indexDAL/abstract/IIndexDAO" import {BIndexDAO} from "./indexDAL/abstract/BIndexDAO" import {MIndexDAO} from "./indexDAL/abstract/MIndexDAO" diff --git a/app/lib/indexer.ts b/app/lib/indexer.ts index e27a8a66a9c13ae4a0b626bce7408a378e5e6482..dc602ee75d5b4bb7a255a2bb954d353309d6d065 100644 --- a/app/lib/indexer.ts +++ b/app/lib/indexer.ts @@ -31,7 +31,7 @@ import {Underscore} from "./common-libs/underscore" import {DataErrors} from "./common-libs/errors" import {MonitorExecutionTime} from "./debug/MonitorExecutionTime" import {NewLogger} from "./logger" -import { wotMemCopy } from "dubp-wot-rs" +import { WotBuilder } from "duniteroxyde" const constants = CommonConstants @@ -2021,7 +2021,7 @@ export function reduceBy<T extends IndexEntry>(reducables: T[], properties: (key } async function checkPeopleAreNotOudistanced (pubkeys: string[], newLinks: { [k:string]: string[] }, newcomers: string[], conf: ConfDTO, dal:FileDAL) { - let wotb = wotMemCopy(dal.wotb); + let wotb = WotBuilder.fromWot(dal.wotb); let current = await dal.getCurrentBlockOrNull(); let membersCount = current ? current.membersCount : 0; // We add temporarily the newcomers to the WoT, to integrate their new links diff --git a/app/lib/system/directory.ts b/app/lib/system/directory.ts index 0571c860225826299f775245c8b6adbb259e672e..742055668bd5131a668185b056fa90d4503b0d46 100644 --- a/app/lib/system/directory.ts +++ b/app/lib/system/directory.ts @@ -15,7 +15,7 @@ import * as path from "path" import * as fs from 'fs' import {SQLiteDriver} from "../dal/drivers/SQLiteDriver" import {CFSCore} from "../dal/fileDALs/CFSCore" -import {Wot} from "dubp-wot-rs" +import {Wot, WotBuilder} from "duniteroxyde" import {FileDALParams} from "../dal/fileDAL" import {cliprogram} from "../common-libs/programOptions" import {LevelDBDriver} from "../dal/drivers/LevelDBDriver" @@ -211,7 +211,7 @@ export const Directory = { const sqlitePath = path.join(home, Directory.DUNITER_DB_NAME + '.db'); dbf = () => new SQLiteDriver(sqlitePath); let wotbFilePath = await Directory.getWotbFilePath(home); - wotbf = () => new Wot(wotbFilePath) + wotbf = () => WotBuilder.fromFile(wotbFilePath) } return { home: params.home, diff --git a/app/modules/crawler/lib/sync/v2/GlobalIndexStream.ts b/app/modules/crawler/lib/sync/v2/GlobalIndexStream.ts index a1b73922d5c1e6482327d6051e1bdfd9b1bb6b0c..c2bb86ff22f19806b71d15a9305411633a514288 100644 --- a/app/modules/crawler/lib/sync/v2/GlobalIndexStream.ts +++ b/app/modules/crawler/lib/sync/v2/GlobalIndexStream.ts @@ -15,7 +15,7 @@ import {DuniterBlockchain, requiredBindexSizeForTail} from "../../../../../lib/b import {BlockDTO} from "../../../../../lib/dto/BlockDTO" import {Underscore} from "../../../../../lib/common-libs/underscore" import {MonitorExecutionTime} from "../../../../../lib/debug/MonitorExecutionTime" -import {Wot} from "dubp-wot-rs" +import {Wot} from "duniteroxyde" import {NewLogger} from "../../../../../lib/logger" import {CommonConstants} from "../../../../../lib/common-libs/constants" import {DBBlock} from "../../../../../lib/db/DBBlock" diff --git a/package.json b/package.json index 3421b79cef855b44234d034afde7d9f7d2537d5c..21a186cad36fb691132a72e57319bf19e66e0f47 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "cors": "2.8.2", "daemonize2": "0.4.2", "ddos": "0.1.16", - "dubp-wot-rs": "0.7.0", + "duniteroxyde": "0.1.0", "errorhandler": "1.5.0", "event-stream": "3.3.4", "express": "4.15.2", diff --git a/test/integration/wot/wotb.ts b/test/integration/wot/wotb.ts index 74fb35f9622af88ba766fa972d2edd72c36becb8..894b1c6e8e1e7c0b80ca9f68bd8310c9392c9c61 100644 --- a/test/integration/wot/wotb.ts +++ b/test/integration/wot/wotb.ts @@ -14,7 +14,7 @@ import {TestUser} from "../tools/TestUser" import {NewTestingServer, TestingServer} from "../tools/toolbox" import {BmaDependency} from "../../../app/modules/bma/index" -import {Wot, wotMemCopy} from "dubp-wot-rs" +import {Wot} from "duniteroxyde" import {Underscore} from "../../../app/lib/common-libs/underscore" import {shutDownEngine} from "../tools/shutdown-engine" import {CommonConstants} from "../../../app/lib/common-libs/constants" diff --git a/yarn.lock b/yarn.lock index 3792b35538f120d69f705e80db69452967aa3fb5..bb70a6a16d9ec3925befd1a066b205e5a2d7abc3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1495,10 +1495,10 @@ doctrine@^2.1.0: dependencies: esutils "^2.0.2" -dubp-wot-rs@0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/dubp-wot-rs/-/dubp-wot-rs-0.6.0.tgz#42ecaae435840a77bfc2cf023c4a8d4f7b22924d" - integrity sha512-5imOlrpD15zAVCoBPhNF2nQPA/vcr90Rs/0SZ71SgdNtQbMFOWCkcr3LQecazsaqLzJkBEUkFyABvQF4AI1MJw== +duniteroxyde@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/duniteroxyde/-/duniteroxyde-0.1.0.tgz#acc06fb7ac6e269a5d8b25f09c5d48088a087917" + integrity sha512-EDfxKlVhJrUyuWd9gBNHC1wrQ6Zc6z5JYR1LQf4yhW6N/LNPzM3S0uI95gWeSyNqwSlIiLiIOMoRxJenozqH4g== dependencies: neon-cli "^0.4.0"