Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OriginTrail Devnet Prerelease v6.2.2 Hotfix 2 #3076

Merged
merged 5 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading