Skip to content

Commit

Permalink
free on handleTransactionUnderpriced
Browse files Browse the repository at this point in the history
  • Loading branch information
mouseless0x committed Jan 10, 2025
1 parent 416d4c5 commit e27e0f0
Showing 1 changed file with 7 additions and 3 deletions.
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

0 comments on commit e27e0f0

Please sign in to comment.