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

fix: update resurrector.ts #47

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion src/worker/bridgeExecutor/monitor/l1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export class L1Monitor extends Monitor {

await this.executorL2.transaction(msgs)
this.logger.info(
`[proccessMsgs - ${this.name()}] Succeeded to submit tx in height: ${this.currentHeight} Msgs length: ${msgs.length}`
`[processMsgs - ${this.name()}] Succeeded to submit tx in height: ${this.currentHeight} Msgs length: ${msgs.length}`
)
} catch (err) {
const errMsg = this.helper.extractErrorMessage(err)
Expand Down
8 changes: 4 additions & 4 deletions src/worker/bridgeExecutor/monitor/resurrector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const MAX_RESURRECT_SIZE = 100
export class Resurrector {
private db: DataSource
unconfirmedTxs: UnconfirmedTxEntity[] = []
proccessedTxsNum: number
processedTxsNum: number
isRunning = true
helper: MonitorHelper = new MonitorHelper()

Expand All @@ -39,9 +39,9 @@ export class Resurrector {
{ processed: true }
)

this.proccessedTxsNum++
this.processedTxsNum++
this.logger.info(
`[updateProcessed - ${this.name()}] Resurrected failed tx sequence ${unconfirmedTx.sequence} current processed txs: ${this.proccessedTxsNum} / ${this.unconfirmedTxs.length}`
`[updateProcessed - ${this.name()}] Resurrected failed tx sequence ${unconfirmedTx.sequence} current processed txs: ${this.processedTxsNum} / ${this.unconfirmedTxs.length}`
)
}

Expand Down Expand Up @@ -130,7 +130,7 @@ export class Resurrector {

public async resurrect(): Promise<void> {
this.unconfirmedTxs = await this.getUnconfirmedTxs()
this.proccessedTxsNum = 0
this.processedTxsNum = 0

if (this.unconfirmedTxs.length === 0) {
this.logger.info(`[resurrect - ${this.name()}] No unconfirmed txs found`)
Expand Down