Skip to content

Commit

Permalink
Merge pull request #3079 from OriginTrail/v6/prerelease/testnet
Browse files Browse the repository at this point in the history
OriginTrail Tesnet Release v6.2.2 Hotfix 2
  • Loading branch information
djordjekovac authored Mar 1, 2024
2 parents 1b1e924 + c6a2d6d commit ab2466c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 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
@@ -1,6 +1,6 @@
{
"name": "origintrail_node",
"version": "6.2.2",
"version": "6.2.2+hotfix.2",
"description": "OTNode V6",
"main": "index.js",
"type": "module",
Expand Down
5 changes: 2 additions & 3 deletions src/commands/command-executor.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class CommandExecutor {
* @private
*/
async _addDefaultCommand(name) {
await this._delete(name);
await this.delete(name);
const handler = this.commandResolver.resolve(name);
if (!handler) {
this.logger.warn(`Command '${name}' will not be executed.`);
Expand Down Expand Up @@ -376,9 +376,8 @@ class CommandExecutor {
* Delete command from database
* @param name
* @returns {Promise<void>}
* @private
*/
async _delete(name) {
async delete(name) {
await this.repositoryModuleManager.destroyCommand(name);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,14 @@ class BlockchainEpochCheckCommand extends Command {

const transactionQueueLength =
this.blockchainModuleManager.getTotalTransactionQueueLength(blockchain);
if (transactionQueueLength >= totalTransactions) return;
if (transactionQueueLength >= totalTransactions) {
this.logger.debug(
`Epoch check: Current transaction queue length is ${transactionQueueLength}, ` +
`exceeding the maximum total transactions: ${totalTransactions} for ${blockchain}` +
`with operation id: ${operationId}`,
);
return Command.repeat();
}

totalTransactions -= transactionQueueLength;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class EpochCheckCommand extends Command {
`Epoch check: Starting epoch check command for operation id: ${operationId}`,
);

await this.commandExecutor.delete('blockchainEpochCheckCommand');

await Promise.all(
this.blockchainModuleManager.getImplementationNames().map(async (blockchain) => {
const commandData = {
Expand Down

0 comments on commit ab2466c

Please sign in to comment.