From f4cecc2ac5d05cc8933fbc996497d6ee76eff557 Mon Sep 17 00:00:00 2001 From: mouseless <97399882+mouseless-eth@users.noreply.github.com> Date: Mon, 14 Oct 2024 21:15:47 +0100 Subject: [PATCH] use blockrange from config for endpoint eth_getUserOperationByHash --- src/rpc/rpcHandler.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/rpc/rpcHandler.ts b/src/rpc/rpcHandler.ts index 7d3f9277..2ee90dd7 100644 --- a/src/rpc/rpcHandler.ts +++ b/src/rpc/rpcHandler.ts @@ -115,7 +115,6 @@ export class RpcHandler implements IRpcEndpoint { executor: Executor monitor: Monitor nonceQueuer: NonceQueuer - rpcMaxBlockRange: number | undefined logger: Logger metrics: Metrics executorManager: ExecutorManager @@ -617,9 +616,9 @@ export class RpcHandler implements IRpcEndpoint { let fromBlock: bigint | undefined let toBlock: "latest" | undefined - if (this.rpcMaxBlockRange !== undefined) { + if (this.config.maxBlockRange !== undefined) { const latestBlock = await this.config.publicClient.getBlockNumber() - fromBlock = latestBlock - BigInt(this.rpcMaxBlockRange) + fromBlock = latestBlock - BigInt(this.config.maxBlockRange) if (fromBlock < 0n) { fromBlock = 0n }