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

flag to remove stuck txs #90

Merged
merged 4 commits into from
Jan 20, 2024
Merged
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
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
Loading