Skip to content

Commit

Permalink
Fix sync
Browse files Browse the repository at this point in the history
  • Loading branch information
AllFi committed Jul 10, 2024
1 parent 5e21934 commit c9b36f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zp-relayer/pool/BasePool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ export abstract class BasePool<N extends Network = Network> {

async syncStateFromIndexer(indexerUrl: string) {
let txs = []
let commitIndex = this.optimisticState.getNextIndex() / OUTPLUSONE
let commitIndex = this.state.getNextIndex() / OUTPLUSONE
do {
txs = await this.fetchTransactionsFromIndexer(indexerUrl, this.optimisticState.getNextIndex(), 200)
txs = await this.fetchTransactionsFromIndexer(indexerUrl, this.state.getNextIndex(), 200)
for (const tx of txs) {
const outCommit = hexToNumberString('0x' + tx.commitment)
this.optimisticState.addCommitment(commitIndex, Helpers.strToNum(outCommit))
Expand Down

0 comments on commit c9b36f6

Please sign in to comment.