Skip to content

Commit 45050bc

Browse files
authored
Merge pull request ethereum#101 from maticnetwork/jdkanani/fix-block-filter-logs
fix: ignore block filter error for bor logs
2 parents dd84c42 + ba41623 commit 45050bc

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

eth/filters/bor_filter.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package filters
1818

1919
import (
2020
"context"
21-
"errors"
2221

2322
"github.com/ethereum/go-ethereum/common"
2423
"github.com/ethereum/go-ethereum/core/types"
@@ -76,13 +75,9 @@ func newBorBlockLogsFilter(backend Backend, sprint uint64, addresses []common.Ad
7675
func (f *BorBlockLogsFilter) Logs(ctx context.Context) ([]*types.Log, error) {
7776
// If we're doing singleton block filtering, execute and return
7877
if f.block != (common.Hash{}) {
79-
receipt, err := f.backend.GetBorBlockReceipt(ctx, f.block)
80-
if err != nil {
81-
return nil, err
82-
}
83-
78+
receipt, _ := f.backend.GetBorBlockReceipt(ctx, f.block)
8479
if receipt == nil {
85-
return nil, errors.New("unknown block")
80+
return nil, nil
8681
}
8782
return f.borBlockLogs(ctx, receipt)
8883
}

0 commit comments

Comments
 (0)