Skip to content

Commit 53ee00e

Browse files
authored
Merge pull request #6190 from filecoin-project/fix/panic
chore: fix panic
2 parents 471ff09 + db97e93 commit 53ee00e

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

app/submodule/eth/eth_event_api.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ func newEthEventAPI(ctx context.Context, em *EthSubModule) (*ethEventAPI, error)
3737
ChainAPI: chainAPI,
3838
MaxFilterHeightRange: abi.ChainEpoch(cfg.Event.MaxFilterHeightRange),
3939
SubscribtionCtx: ctx,
40+
disable: !cfg.EnableEthRPC || cfg.Event.DisableRealTimeFilterAPI,
4041
}
4142

42-
if !cfg.EnableEthRPC || cfg.Event.DisableRealTimeFilterAPI {
43+
if ee.disable {
4344
// all event functionality is disabled
4445
// the historic filter API relies on the real time one
4546
return ee, nil
@@ -117,10 +118,12 @@ type ethEventAPI struct {
117118
SubManager *EthSubscriptionManager
118119
MaxFilterHeightRange abi.ChainEpoch
119120
SubscribtionCtx context.Context
121+
122+
disable bool
120123
}
121124

122125
func (e *ethEventAPI) Start(ctx context.Context) error {
123-
if e.em.cfg.FevmConfig.Event.DisableRealTimeFilterAPI {
126+
if e.disable {
124127
return nil
125128
}
126129

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,6 @@ require (
330330

331331
replace (
332332
github.com/filecoin-project/filecoin-ffi => ./extern/filecoin-ffi
333-
github.com/filecoin-project/go-jsonrpc => github.com/ipfs-force-community/go-jsonrpc v0.1.7
333+
github.com/filecoin-project/go-jsonrpc => github.com/ipfs-force-community/go-jsonrpc v0.1.8-0.20230905031755-d9d242594c9b
334334
github.com/filecoin-project/test-vectors => ./extern/test-vectors
335335
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,8 @@ github.com/influxdata/influxdb-client-go/v2 v2.2.2 h1:O0CGIuIwQafvAxttAJ/VqMKfbW
588588
github.com/influxdata/influxdb-client-go/v2 v2.2.2/go.mod h1:fa/d1lAdUHxuc1jedx30ZfNG573oQTQmUni3N6pcW+0=
589589
github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7wlPfJLvMCdtV4zPulc4uCPrlywQOmbFOhgQNU=
590590
github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo=
591-
github.com/ipfs-force-community/go-jsonrpc v0.1.7 h1:e0ZTapGFhDY54j0QpRYN54Q3FHawUBQAM1KvXOzZtYY=
592-
github.com/ipfs-force-community/go-jsonrpc v0.1.7/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM=
591+
github.com/ipfs-force-community/go-jsonrpc v0.1.8-0.20230905031755-d9d242594c9b h1:bsEpRCnrKsqw7j7ahWFTRSxAezb0XBqwgR5zfbFzN80=
592+
github.com/ipfs-force-community/go-jsonrpc v0.1.8-0.20230905031755-d9d242594c9b/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM=
593593
github.com/ipfs-force-community/metrics v1.0.1-0.20231011024528-8c881d456601 h1:zxKQ30KAD6KfvSFAx9tuqQXLDsEHyF+eVaUBXXYC2bU=
594594
github.com/ipfs-force-community/metrics v1.0.1-0.20231011024528-8c881d456601/go.mod h1:wM6EmkEcnJgWOFcVytgvK0u15awEmt8He0f2kAdsFDA=
595595
github.com/ipfs-force-community/sophon-auth v1.14.0-rc1 h1:r+TSz2r6H7K0ZtsiyS4Hmmf1bM62e5vQiHA8SYPIBz4=

0 commit comments

Comments
 (0)