diff --git a/packages/bundler/src/modules/MempoolManager.ts b/packages/bundler/src/modules/MempoolManager.ts index 1b5a0be1..1803706e 100644 --- a/packages/bundler/src/modules/MempoolManager.ts +++ b/packages/bundler/src/modules/MempoolManager.ts @@ -151,9 +151,15 @@ export class MempoolManager { const isPaymasterSenderViolation = knownSenders.includes(paymaster?.toLowerCase() ?? '') const isFactorySenderViolation = knownSenders.includes(factory?.toLowerCase() ?? '') + + requireCond( + !isPaymasterSenderViolation, + `A Paymaster at ${paymaster} in this UserOperation is used as a sender entity in another UserOperation currently in mempool.`, + ValidationErrors.OpcodeValidation + ) requireCond( - !isPaymasterSenderViolation && !isFactorySenderViolation, - `An entity in this UserOperation is used as a sender entity in another UserOperation currently in mempool. (${paymaster}:${isPaymasterSenderViolation};${factory}:${isFactorySenderViolation})`, + !isPaymasterSenderViolation, + `A Factory at ${factory} in this UserOperation is used as a sender entity in another UserOperation currently in mempool. (${paymaster}:${isPaymasterSenderViolation};${factory}:${isFactorySenderViolation})`, ValidationErrors.OpcodeValidation ) } @@ -260,7 +266,7 @@ export class MempoolManager { * Returns all addresses that are currently known to be "senders" according to the current mempool. */ getKnownSenders (): string[] { - return this.getSortedForInclusion().map(it => { + return this.mempool.map(it => { return it.userOp.sender.toLowerCase() }) }