-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from sotatek-dev/develop
Develop
- Loading branch information
Showing
24 changed files
with
659 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
export const MINA_BRIDGE_CRAWLER_QUEUE = 'MINA_BRIDGE_CRAWLER_QUEUE'; | ||
export const MINA_BRIDGE_SUBMITTER_QUEUE = 'MINA_BRIDGE_SUBMITTER_QUEUE'; | ||
export enum EQueueName { | ||
EVM_SENDER_QUEUE = 'EVM_SENDER_QUEUE', | ||
MINA_SENDER_QUEUE = 'MINA_SENDER_QUEUE', | ||
UNLOCK_JOB_QUEUE = 'UNLOCK_JOB_QUEUE', | ||
} | ||
export const getEvmValidatorQueueName = (index: number) => `EVM_VALIDATOR_${index}`; | ||
export const getMinaValidatorQueueName = (index: number) => `MINA_VALIDATOR_${index}`; |
17 changes: 17 additions & 0 deletions
17
src/database/migrations/1727799403569-unique-validator-tx.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { MigrationInterface, QueryRunner, TableUnique } from 'typeorm'; | ||
|
||
export class UniqueValidatorTx1727799403569 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
return queryRunner.createUniqueConstraint( | ||
'multi_signature', | ||
new TableUnique({ | ||
name: 'unique_validator_tx', | ||
columnNames: ['validator', 'tx_id'], | ||
}), | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
return queryRunner.dropUniqueConstraint('multi_signature','unique_validator_tx') | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/database/migrations/1727838565058-add-timestamp-check-event-logs.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm'; | ||
|
||
export class AddTimestampCheckEventLogs1727838565058 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
return queryRunner.addColumns('event_logs', [ | ||
new TableColumn({ name: 'next_validate_signature_job_time', type: 'bigint', default: 0 }), | ||
new TableColumn({ name: 'next_send_tx_job_time', type: 'bigint', default: 0 }), | ||
]); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
return queryRunner.dropColumns('event_logs', ['next_send_tx_job_time', 'next_validate_signature_job_time']); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.