Skip to content

Commit

Permalink
Merge pull request ethereum#101 from maticnetwork/jdkanani/fix-block-…
Browse files Browse the repository at this point in the history
…filter-logs

fix: ignore block filter error for bor logs
  • Loading branch information
jdkanani authored Jan 6, 2021
2 parents dd84c42 + ba41623 commit 45050bc
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions eth/filters/bor_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package filters

import (
"context"
"errors"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
Expand Down Expand Up @@ -76,13 +75,9 @@ func newBorBlockLogsFilter(backend Backend, sprint uint64, addresses []common.Ad
func (f *BorBlockLogsFilter) Logs(ctx context.Context) ([]*types.Log, error) {
// If we're doing singleton block filtering, execute and return
if f.block != (common.Hash{}) {
receipt, err := f.backend.GetBorBlockReceipt(ctx, f.block)
if err != nil {
return nil, err
}

receipt, _ := f.backend.GetBorBlockReceipt(ctx, f.block)
if receipt == nil {
return nil, errors.New("unknown block")
return nil, nil
}
return f.borBlockLogs(ctx, receipt)
}
Expand Down

0 comments on commit 45050bc

Please sign in to comment.