Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(CHANGELOG): update for v0.5.2 #130

Merged
merged 1 commit into from
Dec 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# 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
Expand Down
1 change: 0 additions & 1 deletion impl/graphsync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,6 @@ func TestGraphsyncBlockListeners(t *testing.T) {
require.Equal(t, blockChainLength, blocksSent)
}


type gsTestData struct {
mn mocknet.Mocknet
ctx context.Context
Expand Down
8 changes: 4 additions & 4 deletions notifications/data_subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ package notifications
import "sync"

type TopicDataSubscriber struct {
idMapLk sync.RWMutex
data map[Topic][]TopicData
idMapLk sync.RWMutex
data map[Topic][]TopicData
Subscriber
}

// NewTopicDataSubscriber produces a subscriber that will transform
// 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),
}
}

Expand Down
2 changes: 1 addition & 1 deletion notifications/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
5 changes: 2 additions & 3 deletions requestmanager/requestmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions requestmanager/requestmanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions responsemanager/peerresponsemanager/peerresponsesender.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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,
})

Expand Down
2 changes: 1 addition & 1 deletion testutil/testnotifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down