Skip to content

Commit

Permalink
fix this.config.maxBlockRange
Browse files Browse the repository at this point in the history
  • Loading branch information
plusminushalf committed Oct 14, 2024
1 parent 45a0966 commit de23597
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 de23597

Please sign in to comment.