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

remove call to mempool.removeSubmitted during AA95 resubmissions #403

Merged
merged 2 commits into from
Jan 10, 2025
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
10 changes: 7 additions & 3 deletions src/executor/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ export class Executor {
if (isTransactionUnderPriced) {
await this.handleTransactionUnderPriced({
nonce: request.nonce,
executor: request.from
executor: request.account
})
}

Expand All @@ -681,15 +681,15 @@ export class Executor {
async handleTransactionUnderPriced({
nonce,
executor
}: { nonce: number; executor: Address }) {
}: { nonce: number; executor: Account }) {
const submitted = this.mempool.dumpSubmittedOps()

const conflictingOps = submitted
.filter((submitted) => {
const tx = submitted.transactionInfo

return (
tx.executor.address === executor &&
tx.executor.address === executor.address &&
tx.transactionRequest.nonce === nonce
)
})
Expand All @@ -702,6 +702,10 @@ export class Executor {
this.mempool.removeSubmitted(op.userOperationHash)
this.mempool.add(op.mempoolUserOperation, op.entryPoint)
})

if (conflictingOps.length > 0) {
this.markWalletProcessed(executor)
}
}

async bundle(
Expand Down
4 changes: 0 additions & 4 deletions src/executor/executorManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,6 @@ export class ExecutorManager {
(transactionInfo.transactionRequest.gas * multiplier) / 100n
transactionInfo.transactionRequest.nonce += 1

opInfos.map(({ userOperationHash }) => {
this.mempool.removeSubmitted(userOperationHash)
})

await this.replaceTransaction(transactionInfo, "AA95")
} else {
await Promise.all(
Expand Down
Loading