misc(bs/n) rm dead code
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committed
Nov 21, 2014 at 17:29 UTC
134929ac6440dcf6fa6840291e8d9112c079c661
1 file changed
-22
exchange/bitswap/notifications/notifications.go
-22
@@ -29,28 +29,6 @@ func (ps *impl) Publish(block *blocks.Block) {
29
ps.wrapped.Pub(block, topic)
30
}
31
32
-func (ps *impl) SubscribeDeprec(ctx context.Context, keys ...u.Key) <-chan *blocks.Block {
33
- topics := make([]string, 0)
34
- for _, key := range keys {
35
- topics = append(topics, string(key))
36
- }
37
- subChan := ps.wrapped.SubOnce(topics...)
38
- blockChannel := make(chan *blocks.Block, 1) // buffered so the sender doesn't wait on receiver
39
- go func() {
40
- defer close(blockChannel)
41
- select {
42
- case val := <-subChan:
43
- block, ok := val.(*blocks.Block)
44
- if ok {
45
- blockChannel <- block
46
- }
47
- case <-ctx.Done():
48
- ps.wrapped.Unsub(subChan, topics...)
49
- }
50
- }()
51
- return blockChannel
52
-}
53
-
32
func (ps *impl) Shutdown() {
33
ps.wrapped.Shutdown()
34
}