Skip to content

Commit

Permalink
Merge pull request #6190 from filecoin-project/fix/panic
Browse files Browse the repository at this point in the history
chore: fix panic
  • Loading branch information
0x5459 authored Oct 13, 2023
2 parents 471ff09 + db97e93 commit 53ee00e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions app/submodule/eth/eth_event_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ func newEthEventAPI(ctx context.Context, em *EthSubModule) (*ethEventAPI, error)
ChainAPI: chainAPI,
MaxFilterHeightRange: abi.ChainEpoch(cfg.Event.MaxFilterHeightRange),
SubscribtionCtx: ctx,
disable: !cfg.EnableEthRPC || cfg.Event.DisableRealTimeFilterAPI,
}

if !cfg.EnableEthRPC || cfg.Event.DisableRealTimeFilterAPI {
if ee.disable {
// all event functionality is disabled
// the historic filter API relies on the real time one
return ee, nil
Expand Down Expand Up @@ -117,10 +118,12 @@ type ethEventAPI struct {
SubManager *EthSubscriptionManager
MaxFilterHeightRange abi.ChainEpoch
SubscribtionCtx context.Context

disable bool
}

func (e *ethEventAPI) Start(ctx context.Context) error {
if e.em.cfg.FevmConfig.Event.DisableRealTimeFilterAPI {
if e.disable {
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,6 @@ require (

replace (
github.com/filecoin-project/filecoin-ffi => ./extern/filecoin-ffi
github.com/filecoin-project/go-jsonrpc => github.com/ipfs-force-community/go-jsonrpc v0.1.7
github.com/filecoin-project/go-jsonrpc => github.com/ipfs-force-community/go-jsonrpc v0.1.8-0.20230905031755-d9d242594c9b
github.com/filecoin-project/test-vectors => ./extern/test-vectors
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,8 @@ github.com/influxdata/influxdb-client-go/v2 v2.2.2 h1:O0CGIuIwQafvAxttAJ/VqMKfbW
github.com/influxdata/influxdb-client-go/v2 v2.2.2/go.mod h1:fa/d1lAdUHxuc1jedx30ZfNG573oQTQmUni3N6pcW+0=
github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7wlPfJLvMCdtV4zPulc4uCPrlywQOmbFOhgQNU=
github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo=
github.com/ipfs-force-community/go-jsonrpc v0.1.7 h1:e0ZTapGFhDY54j0QpRYN54Q3FHawUBQAM1KvXOzZtYY=
github.com/ipfs-force-community/go-jsonrpc v0.1.7/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM=
github.com/ipfs-force-community/go-jsonrpc v0.1.8-0.20230905031755-d9d242594c9b h1:bsEpRCnrKsqw7j7ahWFTRSxAezb0XBqwgR5zfbFzN80=
github.com/ipfs-force-community/go-jsonrpc v0.1.8-0.20230905031755-d9d242594c9b/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM=
github.com/ipfs-force-community/metrics v1.0.1-0.20231011024528-8c881d456601 h1:zxKQ30KAD6KfvSFAx9tuqQXLDsEHyF+eVaUBXXYC2bU=
github.com/ipfs-force-community/metrics v1.0.1-0.20231011024528-8c881d456601/go.mod h1:wM6EmkEcnJgWOFcVytgvK0u15awEmt8He0f2kAdsFDA=
github.com/ipfs-force-community/sophon-auth v1.14.0-rc1 h1:r+TSz2r6H7K0ZtsiyS4Hmmf1bM62e5vQiHA8SYPIBz4=
Expand Down

0 comments on commit 53ee00e

Please sign in to comment.