fix: embed hcEvents into events as pointer so as not to copy lock
This commit is contained in:
parent
bbb9a9cd1a
commit
659c723ea3
@ -51,7 +51,7 @@ type Events struct {
|
|||||||
readyOnce sync.Once
|
readyOnce sync.Once
|
||||||
|
|
||||||
heightEvents
|
heightEvents
|
||||||
hcEvents
|
*hcEvents
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewEvents(ctx context.Context, api eventAPI) *Events {
|
func NewEvents(ctx context.Context, api eventAPI) *Events {
|
||||||
@ -74,7 +74,7 @@ func NewEvents(ctx context.Context, api eventAPI) *Events {
|
|||||||
htHeights: map[abi.ChainEpoch][]uint64{},
|
htHeights: map[abi.ChainEpoch][]uint64{},
|
||||||
},
|
},
|
||||||
|
|
||||||
hcEvents: *newHCEvents(ctx, api, tsc, uint64(gcConfidence)),
|
hcEvents: newHCEvents(ctx, api, tsc, uint64(gcConfidence)),
|
||||||
}
|
}
|
||||||
|
|
||||||
e.ready.Add(1)
|
e.ready.Add(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user