Skip to content

Commit

Permalink
Merge pull request #90 from pimlicolabs/flag-to-remove-stuck-txs
Browse files Browse the repository at this point in the history
flag to remove stuck txs
  • Loading branch information
mouseless0x authored Jan 20, 2024
2 parents dd3d463 + 98db66a commit 8eb75ac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/cli/src/config/bundler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export const bundlerArgsSchema = z.object({
bundleMode: z.enum(["auto", "manual"]),
bundlerFrequency: z.number().int().min(0),

flushStuckTransactionsDuringStartup: z.boolean(),
safeMode: z.boolean(),

tenderlyEnabled: z.boolean().optional(),
Expand Down
8 changes: 7 additions & 1 deletion packages/cli/src/config/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ export const bundlerOptions: CliCommandOptions<IBundlerArgsInput> = {
require: true,
default: false
},
flushStuckTransactionsDuringStartup: {
description: "Should the bundler try to flush out all stuck pending transactions on startup",
type: "boolean",
require: true,
default: false
},
customGasLimitForEstimation: {
description: "Custom gas limit for estimation",
type: "string"
Expand Down Expand Up @@ -172,7 +178,7 @@ export const bundlerOptions: CliCommandOptions<IBundlerArgsInput> = {
description: "Max block range for rpc calls",
type: "number",
require: false,
}
},
}

export const bundlerCommand: CliCommand<IBundlerArgsInput> = {
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/src/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,9 @@ export const bundlerHandler = async (
parsedArgs.environment
)

// executor.flushStuckTransactions()
if (parsedArgs.flushStuckTransactionsDuringStartup) {
executor.flushStuckTransactions()
}

logger.info(
{ module: "executor" },
Expand Down

0 comments on commit 8eb75ac

Please sign in to comment.