Skip to content

Commit

Permalink
fix funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
gusin13 committed Dec 10, 2024
1 parent 061a808 commit 8224971
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions internal/services/tracked_subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,6 @@ func (ts *TrackedSubscriptions) IsSubscribed(stakingTxHash string) bool {
return exists
}

func (ts *TrackedSubscriptions) GetSubscribedHashes() map[string]struct{} {
ts.mu.RLock()
defer ts.mu.RUnlock()

subscribed := make(map[string]struct{}, len(ts.subscriptions))
for hash := range ts.subscriptions {
subscribed[hash] = struct{}{} // Just copying hashes
}
return subscribed
}

// AddSubscriptions adds multiple subscriptions at once
func (ts *TrackedSubscriptions) AddSubscriptions(stakingTxHashes []string) {
ts.mu.Lock()
defer ts.mu.Unlock()

for _, hash := range stakingTxHashes {
ts.subscriptions[hash] = struct{}{}
}
}

func (ts *TrackedSubscriptions) AddSubscription(stakingTxHash string) {
ts.mu.Lock()
defer ts.mu.Unlock()
Expand Down

0 comments on commit 8224971

Please sign in to comment.