Skip to content

Commit

Permalink
Fix a bug in logic of sync loop (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonid Tyurin authored Jan 6, 2023
1 parent fe14180 commit 8badee9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zp-relayer/pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class Pool {

const lastBlockNumber = await this.getLastBlockToProcess()
let toBlock = startBlock
for (let fromBlock = startBlock; toBlock <= lastBlockNumber + 1; startBlock = toBlock) {
for (let fromBlock = startBlock; toBlock <= lastBlockNumber + 1; fromBlock = toBlock) {
toBlock += config.eventsProcessingBatchSize
const events = await getEvents(this.PoolInstance, 'Message', {
fromBlock,
Expand Down

0 comments on commit 8badee9

Please sign in to comment.