Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 22 additions & 16 deletions assertions/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (m *Manager) syncAssertions(ctx context.Context) {
return true, nil
})
if err != nil {
log.Error("Could not check for assertion added event")
log.Error("Could not check for assertion added event", "err", err)
return
}
}
Expand All @@ -105,22 +105,28 @@ func (m *Manager) syncAssertions(ctx context.Context) {
if fromBlock == toBlock {
continue
}
filterOpts := &bind.FilterOpts{
Start: fromBlock,
End: &toBlock,
Context: ctx,
}
_, err = retry.UntilSucceeds(ctx, func() (bool, error) {
innerErr := m.processAllAssertionsInRange(ctx, filterer, filterOpts)
if innerErr != nil {
log.Error("Could not process assertions in range", "err", innerErr)
return false, innerErr
for startBlock := fromBlock; startBlock <= toBlock; startBlock = startBlock + m.maxGetLogBlocks {
endBlock := startBlock + m.maxGetLogBlocks
if endBlock > toBlock {
endBlock = toBlock
}
filterOpts := &bind.FilterOpts{
Start: startBlock,
End: &endBlock,
Context: ctx,
}
_, err = retry.UntilSucceeds(ctx, func() (bool, error) {
innerErr := m.processAllAssertionsInRange(ctx, filterer, filterOpts)
if innerErr != nil {
log.Error("Could not process assertions in range", "err", innerErr)
return false, innerErr
}
return true, nil
})
if err != nil {
log.Error("Could not check for assertion added event", "err", err)
return
}
return true, nil
})
if err != nil {
log.Error("Could not check for assertion added", "err", err)
return
}
fromBlock = toBlock
case <-ctx.Done():
Expand Down
Loading