Skip to content

Commit

Permalink
Merge pull request #238 from kaleido-io/fix-filter-not-found
Browse files Browse the repository at this point in the history
Mark filter stale for Besu nodes
  • Loading branch information
nguyer authored Nov 7, 2023
2 parents 5fee4d0 + 64c391b commit cfc1538
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/events/block_confirmations.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (bcm *blockConfirmationManager) pollBlockFilter() ([]*ethbinding.Hash, erro
defer cancel()
var blockHashes []*ethbinding.Hash
if err := bcm.rpc.CallContext(ctx, &blockHashes, "eth_getFilterChanges", bcm.filterID); err != nil {
if strings.Contains(err.Error(), "filter not found") {
if strings.Contains(strings.ToLower(err.Error()), "filter not found") {
bcm.filterStale = true
}
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion internal/events/subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func (s *subscription) processNewEvents(ctx context.Context) error {
s.info.Synchronized = true
}
if err := s.rpc.CallContext(ctx, &logs, rpcMethod, s.filterID); err != nil {
if strings.Contains(err.Error(), "filter not found") {
if strings.Contains(strings.ToLower(err.Error()), "filter not found") {
s.markFilterStale(ctx, true)
}
return err
Expand Down

0 comments on commit cfc1538

Please sign in to comment.