Skip to content

Commit cfc1538

Browse files
authored
Merge pull request #238 from kaleido-io/fix-filter-not-found
Mark filter stale for Besu nodes
2 parents 5fee4d0 + 64c391b commit cfc1538

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/events/block_confirmations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ func (bcm *blockConfirmationManager) pollBlockFilter() ([]*ethbinding.Hash, erro
202202
defer cancel()
203203
var blockHashes []*ethbinding.Hash
204204
if err := bcm.rpc.CallContext(ctx, &blockHashes, "eth_getFilterChanges", bcm.filterID); err != nil {
205-
if strings.Contains(err.Error(), "filter not found") {
205+
if strings.Contains(strings.ToLower(err.Error()), "filter not found") {
206206
bcm.filterStale = true
207207
}
208208
return nil, err

internal/events/subscription.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ func (s *subscription) processNewEvents(ctx context.Context) error {
364364
s.info.Synchronized = true
365365
}
366366
if err := s.rpc.CallContext(ctx, &logs, rpcMethod, s.filterID); err != nil {
367-
if strings.Contains(err.Error(), "filter not found") {
367+
if strings.Contains(strings.ToLower(err.Error()), "filter not found") {
368368
s.markFilterStale(ctx, true)
369369
}
370370
return err

0 commit comments

Comments
 (0)