Skip to content

Commit fef7cd9

Browse files
authored
config updates + retry update (#434)
1 parent cff0201 commit fef7cd9

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

src/db/configuration/getConfiguration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ export const getConfiguration = async (): Promise<Config> => {
178178
maxTxsToProcess: 30,
179179
minedTxListenerCronSchedule: "*/5 * * * * *",
180180
maxTxsToUpdate: 50,
181-
retryTxListenerCronSchedule: "*/30 * * * * *",
182-
minEllapsedBlocksBeforeRetry: 15,
181+
retryTxListenerCronSchedule: "*/10 * * * * *",
182+
minEllapsedBlocksBeforeRetry: 4,
183183
maxFeePerGasForRetries: ethers.utils
184184
.parseUnits("1000", "gwei")
185185
.toString(),

src/db/transactions/getTxToRetry.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ WHERE
2929
AND "transactionHash" IS NOT NULL
3030
AND "retryCount" < ${config.maxRetriesPerTx}
3131
ORDER BY
32+
"sentAt",
3233
"nonce"
3334
ASC
3435
LIMIT

src/worker/tasks/retryTx.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ export const retryTx = async () => {
4949
}
5050

5151
const gasOverrides = await getGasSettingsForRetry(tx, provider);
52-
if (
53-
gasOverrides.maxFeePerGas?.gt(config.maxFeePerGasForRetries) ||
54-
gasOverrides.maxPriorityFeePerGas?.gt(
55-
config.maxPriorityFeePerGasForRetries,
56-
)
57-
) {
58-
// Return if gas settings exceed configured limits. Try again later.
59-
logger({
60-
service: "worker",
61-
level: "warn",
62-
queueId: tx.id,
63-
message: `${tx.chainId} chain gas price is higher than maximum threshold.`,
64-
});
65-
return;
66-
}
52+
// if (
53+
// gasOverrides.maxFeePerGas?.gt(config.maxFeePerGasForRetries) ||
54+
// gasOverrides.maxPriorityFeePerGas?.gt(
55+
// config.maxPriorityFeePerGasForRetries,
56+
// )
57+
// ) {
58+
// // Return if gas settings exceed configured limits. Try again later.
59+
// logger({
60+
// service: "worker",
61+
// level: "warn",
62+
// queueId: tx.id,
63+
// message: `${tx.chainId} chain gas price is higher than maximum threshold.`,
64+
// });
65+
// return;
66+
// }
6767

6868
logger({
6969
service: "worker",

0 commit comments

Comments
 (0)