mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 07:36:44 +00:00
Merge pull request #101 from maticnetwork/jdkanani/fix-block-filter-logs
fix: ignore block filter error for bor logs
This commit is contained in:
commit
45050bc7f5
1 changed files with 2 additions and 7 deletions
|
|
@ -18,7 +18,6 @@ package filters
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue