Skip to content

Commit 8a345cc

Browse files
committed
fix mine worker bug
1 parent e112025 commit 8a345cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/worker/queues/mineTransactionQueue.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ export class MineTransactionQueue {
1313
private static q = new Queue<string>(this.name, {
1414
connection: redis,
1515
defaultJobOptions: {
16+
...defaultJobOptions,
1617
// Delay confirming the tx by 500ms.
1718
delay: 500,
1819
// Retry after 2s, 4s, 8s, 16s, 32s, 64s, 128s, 256s, 512s, 1024s (17 minutes)
1920
// This needs to be long enough to handle transactions stuck in mempool.
21+
// @TODO: This can be more optimized based on the chain block time.
2022
attempts: 10,
2123
backoff: { type: "exponential", delay: 2_000 },
22-
...defaultJobOptions,
2324
},
2425
});
2526

0 commit comments

Comments
 (0)