Skip to content

Commit

Permalink
fix(ConfigStoreClient): Unset searchConfig.toBlock after update() (#634)
Browse files Browse the repository at this point in the history
Otherwise any subsequent update() calls will resolve that fromBlock >
toBlock, and no update will occur.
  • Loading branch information
pxrl committed Apr 22, 2024
1 parent 3f778fe commit 4c44993
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ export class AcrossConfigStoreClient extends BaseAbstractClient {
this.hasLatestConfigStoreVersion = this.hasValidConfigStoreVersionForTimestamp();
this.latestBlockSearched = result.searchEndBlock;
this.firstBlockToSearch = result.searchEndBlock + 1; // Next iteration should start off from where this one ended.
this.eventSearchConfig.toBlock = undefined; // Caller can re-set on subsequent updates if necessary
this.chainId = this.chainId ?? chainId; // Update on the first run only.
this.isUpdated = true;

Expand Down

0 comments on commit 4c44993

Please sign in to comment.