Skip to content

Commit 869a119

Browse files
authored
fixed nodemon & retry to not update mined status, let the other process handle it (#117)
1 parent 553c709 commit 869a119

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"docker": "docker compose --env-file ./.env up --remove-orphans",
1111
"docker:build": "docker compose build --no-cache",
1212
"dev": "yarn dev:infra && yarn dev:server & sleep 10 && yarn dev:worker",
13-
"dev:server": "nodemon --watch 'server/**/*.ts' --watch 'core/**/*.ts' --exec 'npx tsx ./server/index.ts'",
14-
"dev:worker": "nodemon --watch 'worker/**/*.ts' --watch 'core/**/*.ts' --exec 'npx tsx ./worker/index.ts'",
13+
"dev:server": "nodemon --watch 'server/**/*.ts' --watch 'core/**/*.ts' --exec 'npx tsx ./server/index.ts' --files server/index.ts",
14+
"dev:worker": "nodemon --watch 'worker/**/*.ts' --watch 'core/**/*.ts' --exec 'npx tsx ./worker/index.ts' --files worker/index.ts",
1515
"dev:infra": "docker compose -f ./docker-compose-infra.yml up -d",
1616
"build": "yarn && rm -rf dist && tsc -p ./tsconfig.json --outDir dist",
1717
"start": "yarn start:server & sleep 20 && yarn start:worker",

worker/controller/retryTransaction.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,6 @@ export const retryTransactions = async (server: FastifyInstance) => {
5656
server.log.debug(
5757
`Got receipt for tx: ${txReceiptData.txHash}, queueId: ${txReceiptData.queueId}, effectiveGasPrice: ${txReceiptData.effectiveGasPrice}`,
5858
);
59-
await updateTransactionState(
60-
knex,
61-
txReceiptData.queueId,
62-
"mined",
63-
trx,
64-
undefined,
65-
{
66-
gasPrice: txReceiptData?.effectiveGasPrice
67-
? BigNumber.from(txReceiptData.effectiveGasPrice).toString()
68-
: undefined,
69-
txMinedTimestamp: new Date(txReceiptData.timestamp),
70-
blockNumber: txReceiptData.blockNumber,
71-
},
72-
);
7359
} else {
7460
//Retry Logic
7561
const walletData = await getWalletDetailsWithTransaction(

0 commit comments

Comments
 (0)