Skip to content

Commit

Permalink
Merge pull request #328 from pimlicolabs/fix/receipts
Browse files Browse the repository at this point in the history
fix this.config.maxBlockRange
  • Loading branch information
plusminushalf authored Oct 14, 2024
2 parents 45a0966 + de23597 commit 0d9d008
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/executor/executorManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export class ExecutorManager {
private timer?: NodeJS.Timer
private gasPriceManager: GasPriceManager
private eventManager: EventManager
rpcMaxBlockRange: number | undefined

constructor({
config,
Expand Down Expand Up @@ -601,9 +600,9 @@ export class ExecutorManager {

let fromBlock: bigint | undefined = undefined
let toBlock: "latest" | undefined = 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
}
Expand Down

0 comments on commit 0d9d008

Please sign in to comment.