Skip to content

Commit

Permalink
Re-add chain to filter system
Browse files Browse the repository at this point in the history
  • Loading branch information
lukanus committed Feb 15, 2024
1 parent 9326e0d commit 5c8860f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1893,7 +1893,7 @@ func RegisterGraphQLService(stack *node.Node, backend ethapi.Backend, filterSyst

// RegisterFilterAPI adds the eth log filtering RPC API to the node.
func RegisterFilterAPI(stack *node.Node, backend ethapi.Backend, ethcfg *ethconfig.Config, chain *core.BlockChain) *filters.FilterSystem {
filterSystem := filters.NewFilterSystem(backend, filters.Config{
filterSystem := filters.NewFilterSystem(backend, chain, filters.Config{
LogCacheSize: ethcfg.FilterLogCacheSize,
})
stack.RegisterAPIs([]rpc.API{{
Expand Down
3 changes: 2 additions & 1 deletion eth/filters/filter_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ type FilterSystem struct {
}

// NewFilterSystem creates a filter system.
func NewFilterSystem(backend Backend, config Config) *FilterSystem {
func NewFilterSystem(backend Backend, chain *core.BlockChain, config Config) *FilterSystem {
config = config.withDefaults()
return &FilterSystem{
backend: backend,
chain: chain,
logsCache: lru.NewCache[common.Hash, *logCacheElem](config.LogCacheSize),
cfg: &config,
}
Expand Down

0 comments on commit 5c8860f

Please sign in to comment.