Skip to content

Commit e782717

Browse files
committed
chore: fix panic
1 parent 471ff09 commit e782717

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
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

0 commit comments

Comments
 (0)