mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-12 15:03:45 +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 (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"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) {
|
func (f *BorBlockLogsFilter) Logs(ctx context.Context) ([]*types.Log, error) {
|
||||||
// If we're doing singleton block filtering, execute and return
|
// If we're doing singleton block filtering, execute and return
|
||||||
if f.block != (common.Hash{}) {
|
if f.block != (common.Hash{}) {
|
||||||
receipt, err := f.backend.GetBorBlockReceipt(ctx, f.block)
|
receipt, _ := f.backend.GetBorBlockReceipt(ctx, f.block)
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
if receipt == nil {
|
if receipt == nil {
|
||||||
return nil, errors.New("unknown block")
|
return nil, nil
|
||||||
}
|
}
|
||||||
return f.borBlockLogs(ctx, receipt)
|
return f.borBlockLogs(ctx, receipt)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue