mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Merge pull request #975 from maticnetwork/shivam/POS-1780
fix : eth_getLogs
This commit is contained in:
commit
969caeb99b
2 changed files with 8 additions and 1 deletions
|
|
@ -2170,11 +2170,15 @@ func RegisterFilterAPI(stack *node.Node, backend ethapi.Backend, ethcfg *ethconf
|
|||
LogCacheSize: ethcfg.FilterLogCacheSize,
|
||||
})
|
||||
|
||||
filterAPI := filters.NewFilterAPI(filterSystem, isLightClient, ethconfig.Defaults.BorLogs)
|
||||
stack.RegisterAPIs([]rpc.API{{
|
||||
Namespace: "eth",
|
||||
Service: filters.NewFilterAPI(filterSystem, isLightClient, ethconfig.Defaults.BorLogs),
|
||||
Service: filterAPI,
|
||||
}})
|
||||
|
||||
// avoiding constructor changed by introducing new method to set genesis
|
||||
filterAPI.SetChainConfig(ethcfg.Genesis.Config)
|
||||
|
||||
return filterSystem
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -491,6 +491,8 @@ func TestInvalidGetLogsRequest(t *testing.T) {
|
|||
blockHash = common.HexToHash("0x1111111111111111111111111111111111111111111111111111111111111111")
|
||||
)
|
||||
|
||||
api.SetChainConfig(params.BorUnittestChainConfig)
|
||||
|
||||
// Reason: Cannot specify both BlockHash and FromBlock/ToBlock)
|
||||
testCases := []FilterCriteria{
|
||||
0: {BlockHash: &blockHash, FromBlock: big.NewInt(100)},
|
||||
|
|
@ -808,6 +810,7 @@ func TestPendingLogsSubscription(t *testing.T) {
|
|||
<-testCases[i].sub.Err()
|
||||
}
|
||||
}
|
||||
|
||||
// nolint:gocognit
|
||||
func TestLightFilterLogs(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
|
|
|||
Loading…
Reference in a new issue