Skip to content

Commit

Permalink
Revert "Add logs to check if the second simulation fails"
Browse files Browse the repository at this point in the history
  • Loading branch information
plusminushalf authored Oct 18, 2024
1 parent f7ccd43 commit 3a947aa
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/rpc/rpcHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ export class RpcHandler implements IRpcEndpoint {
entryPoint,
queuedUserOperations,
true,
deepHexlify({ ...stateOverrides })
stateOverrides
)

let { verificationGasLimit, callGasLimit } =
Expand Down Expand Up @@ -527,8 +527,9 @@ export class RpcHandler implements IRpcEndpoint {
callGasLimit = 0n
}

// Run second time without state overrides
try {
// If a balance override is provided for the sender, perform an additional simulation
// to verify the userOperation succeeds with the specified balance.
if (stateOverrides?.[userOperation.sender]?.balance) {
await this.validator.getExecutionResult(
{
...userOperation,
Expand All @@ -541,10 +542,8 @@ export class RpcHandler implements IRpcEndpoint {
entryPoint,
queuedUserOperations,
false,
deepHexlify({ ...stateOverrides })
deepHexlify(stateOverrides)
)
} catch (err) {
this.logger.error(err, "Second simulations fail")
}

if (isVersion07(userOperation)) {
Expand Down

0 comments on commit 3a947aa

Please sign in to comment.