Commit 8abdfced authored by hannahhoward's avatar hannahhoward

docs(CHANGELOG): update for v0.5.2

also cleanup imports
parent 197722e2
# go-graphsync changelog
# go-graphsync 0.5.2
Minor release resolves bugs in notification system
### Changelog
- github.com/ipfs/go-graphsync:
- RegisterNetworkErrorListener should fire when there's an error connecting to the peer (#127) ([ipfs/go-graphsync#127](https://github.com/ipfs/go-graphsync/pull/127))
- Permit multiple data subscriptions per original topic (#128) ([ipfs/go-graphsync#128](https://github.com/ipfs/go-graphsync/pull/128))
- release: v0.5.1 (#123) ([ipfs/go-graphsync#123](https://github.com/ipfs/go-graphsync/pull/123))
### Contributors
| Contributor | Commits | Lines ± | Files Changed |
|-------------|---------|---------|---------------|
| dirkmc | 2 | +272/-185 | 10 |
| Alex Cruikshank | 1 | +188/-110 | 12 |
| Hannah Howard | 1 | +23/-6 | 3 |
# go-graphsync 0.5.1
### Changelog
......
......@@ -1043,7 +1043,6 @@ func TestGraphsyncBlockListeners(t *testing.T) {
require.Equal(t, blockChainLength, blocksSent)
}
type gsTestData struct {
mn mocknet.Mocknet
ctx context.Context
......
......@@ -3,8 +3,8 @@ package notifications
import "sync"
type TopicDataSubscriber struct {
idMapLk sync.RWMutex
data map[Topic][]TopicData
idMapLk sync.RWMutex
data map[Topic][]TopicData
Subscriber
}
......@@ -12,8 +12,8 @@ type TopicDataSubscriber struct {
// events and topics before passing them on to the given subscriber
func NewTopicDataSubscriber(sub Subscriber) *TopicDataSubscriber {
return &TopicDataSubscriber{
Subscriber: sub,
data: make(map[Topic][]TopicData),
Subscriber: sub,
data: make(map[Topic][]TopicData),
}
}
......
......@@ -36,7 +36,7 @@ type EventTransform func(Event) Event
// Notifee is a topic data subscriber plus a set of data you want to add to any topics subscribed to
// (used to call SubscribeWithData to inject data when events for a given topic emit)
type Notifee struct {
Data TopicData
Data TopicData
Subscriber *TopicDataSubscriber
}
......
......@@ -6,9 +6,6 @@ import (
"fmt"
"sync/atomic"
"github.com/ipfs/go-graphsync/listeners"
"github.com/ipfs/go-graphsync/messagequeue"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log"
......@@ -20,7 +17,9 @@ import (
"github.com/ipfs/go-graphsync/cidset"
"github.com/ipfs/go-graphsync/dedupkey"
ipldutil "github.com/ipfs/go-graphsync/ipldutil"
"github.com/ipfs/go-graphsync/listeners"
gsmsg "github.com/ipfs/go-graphsync/message"
"github.com/ipfs/go-graphsync/messagequeue"
"github.com/ipfs/go-graphsync/metadata"
"github.com/ipfs/go-graphsync/notifications"
"github.com/ipfs/go-graphsync/requestmanager/executor"
......
......@@ -7,8 +7,6 @@ import (
"testing"
"time"
"github.com/ipfs/go-graphsync/listeners"
blocks "github.com/ipfs/go-block-format"
"github.com/ipld/go-ipld-prime"
cidlink "github.com/ipld/go-ipld-prime/linking/cid"
......@@ -18,6 +16,7 @@ import (
"github.com/ipfs/go-graphsync"
"github.com/ipfs/go-graphsync/cidset"
"github.com/ipfs/go-graphsync/dedupkey"
"github.com/ipfs/go-graphsync/listeners"
gsmsg "github.com/ipfs/go-graphsync/message"
"github.com/ipfs/go-graphsync/metadata"
"github.com/ipfs/go-graphsync/notifications"
......
......@@ -467,7 +467,7 @@ func (prs *peerResponseSender) sendResponseMessages() {
continue
}
notifications.SubscribeWithData(prs.publisher, builder.Topic(), notifications.Notifee{
Data: builder.BlockSize(),
Data: builder.BlockSize(),
Subscriber: prs.allocatorSubscriber,
})
responses, blks, err := builder.Build()
......@@ -476,7 +476,7 @@ func (prs *peerResponseSender) sendResponseMessages() {
}
prs.peerHandler.SendResponse(prs.p, responses, blks, notifications.Notifee{
Data: builder.Topic(),
Data: builder.Topic(),
Subscriber: prs.subscriber,
})
......
......@@ -88,7 +88,7 @@ func (nv *NotifeeVerifier) ExpectClose(ctx context.Context, t *testing.T) {
func NewTestNotifee(data notifications.TopicData, bufferSize int) (notifications.Notifee, *NotifeeVerifier) {
subscriber := NewTestSubscriber(bufferSize)
return notifications.Notifee{
Data: data,
Data: data,
Subscriber: notifications.NewTopicDataSubscriber(subscriber),
}, &NotifeeVerifier{
expectedTopic: data,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment