Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
simlecode committed Oct 17, 2024
1 parent 52fdf7c commit eac2d3c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions pkg/events/filter/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,15 +434,15 @@ func (m *EventFilterManager) Remove(ctx context.Context, id types.FilterID) erro
return nil
}

func (m *EventFilterManager) loadExecutedMessages(ctx context.Context, msgTs, rctTs *types.TipSet) ([]executedMessage, error) {
msgs, err := m.MessageStore.MessagesForTipset(msgTs)
func (m *EventFilterManager) loadExecutedMessages(ctx context.Context, msgTS, rctTS *types.TipSet) ([]executedMessage, error) {
msgs, err := m.MessageStore.MessagesForTipset(msgTS)
if err != nil {
return nil, fmt.Errorf("read messages: %w", err)
}

st := adt.WrapStore(ctx, cbor.NewCborStore(m.ChainStore.Blockstore()))

arr, err := blockadt.AsArray(st, rctTs.Blocks()[0].ParentMessageReceipts)
arr, err := blockadt.AsArray(st, rctTS.Blocks()[0].ParentMessageReceipts)
if err != nil {
return nil, fmt.Errorf("load receipts amt: %w", err)
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/events/filter/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,19 +225,19 @@ func (ei *EventIndex) SubscribeUpdates() (chan EventIndexUpdated, func()) {
}

ei.mu.Lock()
subId := ei.subIDCounter
subID := ei.subIDCounter
ei.subIDCounter++
ei.updateSubs[subId] = tSub
ei.updateSubs[subID] = tSub
ei.mu.Unlock()

unSubscribeF := func() {
ei.mu.Lock()
tSub, ok := ei.updateSubs[subId]
tSub, ok := ei.updateSubs[subID]
if !ok {
ei.mu.Unlock()
return
}
delete(ei.updateSubs, subId)
delete(ei.updateSubs, subID)
ei.mu.Unlock()

// cancel the subscription
Expand Down
6 changes: 3 additions & 3 deletions venus-devtool/api-gen/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,9 @@ func init() {
addExample(filterid)
addExample(&filterid)

subid := types.EthSubscriptionID(ethhash)
addExample(subid)
addExample(&subid)
subID := types.EthSubscriptionID(ethhash)
addExample(subID)
addExample(&subID)

pstring := func(s string) *string { return &s }
addExample(&types.EthFilterSpec{
Expand Down

0 comments on commit eac2d3c

Please sign in to comment.