Skip to content

Commit

Permalink
Merge pull request #3198 from OriginTrail/v6/prerelease/devnet
Browse files Browse the repository at this point in the history
 OriginTrail Devnet Release v6.4.0 Hotfix 6
  • Loading branch information
NZT48 authored Jun 13, 2024
2 parents 452adf5 + 1dda419 commit e82fe82
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"axios": "^1.6.0",
"cors": "^2.8.5",
"deep-extend": "^0.6.0",
"dkg-evm-module": "github:OriginTrail/dkg-evm-module#feature/paranets",
"dkg-evm-module": "^4.3.0",
"dotenv": "^16.0.1",
"ethers": "^5.7.2",
"express": "^4.18.1",
Expand Down
14 changes: 7 additions & 7 deletions src/commands/paranet/paranet-sync-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ParanetSyncCommand extends Command {
const paranetId = this.paranetService.constructParanetId(blockchain, contract, tokenId);

this.logger.info(
`Paranet sync: Starting paranet sync for paranetId: ${paranetId}, operation ID: ${operationId}`,
`Paranet sync: Starting paranet sync for paranet: ${paranetUAL}, operation ID: ${operationId}`,
);

let contractKaCount = await this.blockchainModuleManager.getParanetKnowledgeAssetsCount(
Expand All @@ -50,17 +50,17 @@ class ParanetSyncCommand extends Command {
const cachedMissedKaCount =
await this.repositoryModuleManager.getCountOfMissedAssetsOfParanet(paranetUAL);

if (cachedKaCount + cachedMissedKaCount === contractKaCount) {
if (cachedKaCount + cachedMissedKaCount >= contractKaCount) {
this.logger.info(
`Paranet sync: KA count from contract and in DB is the same, nothing new to sync, for paranetId: ${paranetId}, operation ID: ${operationId}!`,
`Paranet sync: KA count from contract and in DB is the same, nothing new to sync, for paranet: ${paranetUAL}, operation ID: ${operationId}!`,
);
if (cachedMissedKaCount > 0) {
this.logger.info(
`Paranet sync: Missed KA count is ${cachedMissedKaCount} syncing ${
cachedMissedKaCount > PARANET_SYNC_KA_COUNT
? PARANET_SYNC_KA_COUNT
: cachedMissedKaCount
} assets, for paranetId: ${paranetId}, operation ID: ${operationId}!`,
} assets, for paranet: ${paranetUAL}, operation ID: ${operationId}!`,
);
const missedParanetAssets =
await this.repositoryModuleManager.getMissedParanetAssetsRecords(
Expand All @@ -76,7 +76,7 @@ class ParanetSyncCommand extends Command {
(async () => {
const { knowledgeAssetId } = missedParanetAsset;
this.logger.info(
`Paranet sync: Syncing missed token id: ${knowledgeAssetId} for ${paranetId} with operation id: ${operationId}`,
`Paranet sync: Syncing missed token id: ${knowledgeAssetId} for ${paranetUAL} with operation id: ${operationId}`,
);

const { knowledgeAssetStorageContract, tokenId: kaTokenId } =
Expand Down Expand Up @@ -172,7 +172,7 @@ class ParanetSyncCommand extends Command {
this.logger.info(
`Paranet sync: Syncing ${
contractKaCount + cachedMissedKaCount - cachedKaCount
} new assets for paranetId: ${paranetId}, operation ID: ${operationId}`,
} new assets for paranet: ${paranetUAL}, operation ID: ${operationId}`,
);
// TODO: Rename i, should it be cachedKaCount + 1 as cachedKaCount is already in, but count is index
const kaToUpdate = [];
Expand All @@ -199,7 +199,7 @@ class ParanetSyncCommand extends Command {
promises.push(
(async () => {
this.logger.info(
`Paranet sync: Syncing token id: ${knowledgeAssetId} for ${paranetId} with operation id: ${operationId}`,
`Paranet sync: Syncing token id: ${knowledgeAssetId} for ${paranetUAL} with operation id: ${operationId}`,
);

const { knowledgeAssetStorageContract, tokenId: kaTokenId } =
Expand Down

0 comments on commit e82fe82

Please sign in to comment.